You can now dynamically showcase media tagged with specific products using our new Dynamic Embed Code feature. This update allows you to display relevant UGC on different product pages without creating separate widgets, saving time and making it easier to manage your content.
This feature is perfect if:
You manage multiple product pages.
You want to reuse one widget across different pages.
You prefer a more flexible and scalable setup.
Let’s walk you through how to use it.
Where to Find the Dynamic Embed Code
1. Go to your 'Widgets' section and open the widget that contains media tagged with your products:
2. From the left sidebar, click the 'Embed' tab, scroll below the standard embed code to find the 'Dynamic Embed Code' section, and click 'Generate code':
Once generated, you’ll see options for two methods:
Option 1: Manual Product ID Substitution
Best for developers or users with dynamic websites
Use this method if you already have product_id
values in your codebase or CMS, and want to load the right media for each product page.
How to use it:
Copy the Dynamic Embed Code.
Replace
{{ product_id }}
with the actual product ID from your catalog:Example code - make sure to amend the
{{ product_id }}
section with your product id:<div class="embedsocial-hashtag" data-ref="89ba5783c3e106b63db926f16b1de76cee4b251a" data-productId="{{ product_id }}"></div> <script> (function(d, s, id) { var js; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "https://embedsocial.com/cdn/ht.js"; d.getElementsByTagName("head")[0].appendChild(js); }(document, "script", "EmbedSocialHashtagScript")); </script>
Paste the code into the relevant product page on your website.
You can also insert the correct ID dynamically based on your URL or page metadata using JavaScript or CMS logic.
Option 2: Choose from the Uploaded Product Catalogs
Best for manual setup without code changes
If you don’t want to touch any code, this option lets you select products directly from your uploaded catalogs.
How to use it:
1. In the Dynamic Embed panel, choose the catalog you’ve already uploaded, and from the list of products, pick the one you want to display media for:
The embed code will automatically update with the correct data-productId
.
2. Then, just copy and paste the embed code into your product pages:
What Happens Next?
No matter which method you use, the widget will automatically:
Filter and display only the media tagged with the selected product.
Update dynamically across your product pages.
That's it!
If you have any questions, click the bottom right chat icon to talk with our customer success team or send us an email at support@embedsocial.com
We're here for you 🙏