How to Set Up Google AdWords Dynamic Remarketing with Tag Manager

how-to-set-up-google-adwords-1Remarketing is a useful feature, as it enables you to bring ads to users who have already visited your website or used your mobile app. Even more useful, however, is dynamic remarketing. This presents users with an ad for a product they will find interesting, based on the products they have viewed, added to their cart, or previously purchased.

You can use dynamic remarketing with AdWords by setting it up in Google Tag Manager.

1. Create AdWords Remarketing Tags

To start, you will need to include AdWords remarketing tags on every page of your site. You will need to build a js object and add tags to pages as early as possible.

Each page needs an ecomm_pagetype key set. Options for pagetype are “home,” “searchresults,” “category,” “product,” “cart,” “purchase,” and “other.” You should also set ecomm_pcat, ecomm_prodid, ecomm_pname, ecomm_pvalue, and ecomm_totalvalue as needed.

For the container, use:

<script>
dataLayer = [];
</script>
<script>
YOUR GTM container code
</script>

To send data to Tag Manger, use:

<script>
dataLayer.push ({
'event':'remarketingTriggered',
'google_tag_params': window.google_tag_params
});
</script>

2. Set Up the Remarketing Tags

In the Tag Manager container, set up a new tag, choosing AdWords Remarketing as the tag type. In your AdWords account, create a new remarketing tag. Take the Conversion ID and Conversion Label from the tag.

3. Send Dynamic Values to Remarketing Tags

Next, you need to pass the dynamic values of the remarketing tag to the steps of your site. You can find custom parameters for various business categories in the AdWords Help Center. If you want to pass additional parameters, the method is the same as for the standard remarketing parameters.

4. Capture Data from Your Website

To populate custom parameter values, you need to capture data by implementing a Tag Manager variable. The tag call pulls dynamic data from the data layer by using a macro.

To create a macro, head to the Custom Parameter section and choose “Use Data Layer Variable.” Choose “Data Layer Variable” as the macro type and name the macro “google_tag_params”.how-to-set-up-google-adwords-2

5. Use a Rule to Specify Triggers

Finally, you need to tell GTM when to fire each instance of the remarketing tag. Choose “Add Rule to Fire Tag” and then “Create new rule.” You can create triggers based on built-in variables like pageviews, link clicks, button clicks, and form submits or on a custom event.

For tags on every page, your rule should be have “{{event}}” in the first box, “contains” in the second, and “remarketingTriggered” in the third.

6. Test Your Tags

Use the Preview mode in Tag Manager to test all the tags on your site. You will find the option at the top right-hand side of the screen when you click the arrow next to the “Publish” button. Click “Debug” to set a cookie on just your browser.

As you navigate through your site, it will be as if your container content was already deployed. The debug panel will also appear, allowing you to see which of your tags are fired by Tag Manager and by which trigger.

By checking content of the dataLayer object in the JavaScript console of your browser, you can see if your site is correctly passing data to Tag Manager. Test different scenarios to check all your tags. For instance, add various items to your cart and view the cart with several products. Keep the console open at all times to make sure none of your custom JavaScript code is leading to errors.

Only when you have tested that all your tags are firing correctly and with the right dynamic values should you publish. To do this, create a new version of the container and click “Publish.”

If you like my articles,