Deploy Widget via Tag Manager
Deploy recommendation widgets using Google Tag Manager for flexible widget management without modifying site code.
Deploy Widget via Google Tag Manager
You can deploy recommendation widgets using Google Tag Manager. This method is useful for adding widgets without modifying your site's codebase.
Prerequisites
- The
ip.jstracking script must already be installed on your site, either directly or via a separate GTM tag that fires before the widget tag.
Steps to Deploy Widget Tag
-
Create a New Tag: In your GTM workspace, create a new tag.
-
Configure the Tag:
- Choose Custom HTML as the tag type.
- Paste the widget script code into the HTML field. Replace
YOUR_DELIVERY_KEYwith your actual key.
<script class="idio-recommendations" type="text/x-mustache" data-api-key="YOUR_DELIVERY_KEY"> {{#content}} <div class="idio-recommendation"> {{#main_image_url}} <a href="{{link_url}}"><img src="{{main_image_url}}?w=150&h=150" class="image" /></a> {{/main_image_url}} <h3><a href="{{link_url}}">{{title}}</a></h3> <p> {{abstract}} <a href="{{link_url}}">Read more...</a> </p> </div> {{/content}} </script> -
Configure the Trigger:
- Set the trigger to fire on the specific pages where you want the widget to appear. You can use a Page View trigger with conditions based on the Page Path.
-
Save and Publish: Save your tag and publish the GTM container.
Updated 4 days ago