API Reference

Wishlist Social Count from Product Metafields

Load wishlist social count from liquid or Shopify Product metafield APIs

🚧

This feature is currently in Beta. To enable it for your store, please contact our support team.

Once enabled, you’ll be able to view the metafield value directly on your product page:


You can access this value in Liquid or JavaScript as shown below::

      {% assign product_social_count = product.metafields.swym_wishlist.wishlist_social_count.value | default: 0 | plus: 0 %}
const shopifyProductId = "9165942685928:";
const productSocialCount = window.SwymViewProducts?.[shopifyProductId]?.socialCount;

📘

If you’re integrating social count on a collection page, keep in mind that window.SwymViewProducts is limited to 100 products per collection for performance reasons.

✅ Best practice: Use the Liquid snippet to render the social count during initial page load.

⚠️ If that isn’t feasible (e.g. with infinite scrolling, search, or filters), use our Social Count Batch API instead. This API retrieves values directly from our internal database rather than metafields.