All Collections
User Generated Content
UGC campaigns
Installing the UGC Campaigns code snippet with Google Tag Manager (GTM)
Installing the UGC Campaigns code snippet with Google Tag Manager (GTM)

At present, the UGC Campaigns embed is the only code snippet that works with GTM - read on to find out how.

James Riley avatar
Written by James Riley
Updated over a week ago

Google Tag Manager (GTM) is designed to make it easy to install code snippets into your website or store. Once set up, code snippets (such as those provided by Sauce), can be installed without needing to modify your theme code. This article assumes that you have already set up GTM for your website, so ensure you have followed the steps in the official setup article correctly before proceeding.

Importantly: With Google Tag Manager, you can add code snippets to your page, but you can not specify where exactly in the page the embed should appear. As such, this approach only works for the following embeds, which are not dependent on being inserted into a specific location on the page:

  • UGC Campaign Embed

Other embeds such as the Instagram feed embeds (such as Grid and Carousel), need to be placed at the exact location where you want the embed to load. Google Tag Manager does not provide this particular control.

Note too, that the 'Sauce conversion code' (used to track sales) will also not work with GTM as it requires that the specific order data (e.g order number and order total) be dynamically inserted into the page - an action carried out by the platform you are using (such as the 'Liquid' templating language from Shopify).

UGC Campaign Embeds

1. Grab your UGC Campaign code snippet
from the Campaign edit page

2. Add your Campaign Pop-up code as a new tag and publish changes

This will follow the usual steps, where you'll want to:

  1. Click 'New' from the Tags page

  2. Give the tag a name (e.g Sauce Campaigns Embed)

  3. Click 'Tag Configuration' and from the list of types, select 'Custom HTML'

4. Click to add a trigger to specify when you want to Embed to load

Here you'll want to specify either all pages or just your homepage for example if this is where you would like it to appear.

3. Publish your container and you're done!

Having carried out these steps, your campaign embed should now be loading:

Did this answer your question?