Search
Clear search
Close search
Google apps
Main menu
true

Tag your site for dynamic remarketing

To show dynamic ads to people who have visited your site, add the global site tag and dynamic remarketing event snippets with custom parameters to your website. This article is part of the dynamic remarketing for web set-up guide. It contains detailed instructions on how to set up your tag for dynamic remarketing. Read About dynamic remarketing for apps if you want to set up your app.

Get custom parameters for your business type

To get the specific custom parameters needed for your tag, read how to Use custom parameters for your business type.

Before you begin

Starting in October 2017, advertisers who set up the AdWords tag for remarketing in the new AdWords experience will see the new AdWords tag that consists of a global site tag and an optional event snippet. If you have the previous AdWords tag installed on your website using JavaScript, it will still work; however, it’s recommended that you use the new AdWords tag. Learn about the Changes to the AdWords remarketing tag.

Keep in mind that a remarketing list needs a minimum number of visitors in order for your dynamic ads to show, which means your website needs a minimum number of visitors.

If you're not familiar with your website's code, consider working with a web developer or someone with a technical background. You can also review common issues with code formatting.

Advertisers can’t use sensitive interest categories to target ads to users or to promote advertisers’ products or services. Read the Personalized advertising policy to learn more.

Instructions

The dynamic remarketing event snippet collects data, such as the IDs of the products or services that people viewed on your website, the types of pages viewed (such as shopping cart pages), and the total value of items. AdWords uses this data to show customized ads to your website visitors, and remind them about their visit to your site. Here's how to set this up: 

Choose the AdWords experience you're using. Learn more

  1. Sign in to AdWords.
  2. Click Shared library.
  3. Under "Audiences," click View.
  4. If you’re setting up remarketing for the first time, you’ll see several remarketing options. Under "Website visitors," select the “dynamic remarketing” option, then select your business type. This will add the required custom parameters to your remarketing tag code. If you select “Retail”, follow the instructions to link your Merchant Center and AdWords accounts.
  5. Click Tag details.
  6. Select and copy the remarketing tag code. This tag works on both desktop and mobile websites.
  7. Insert your custom tag to all your webpages, right before the closing </body> tag. If your website uses a common file for a footer, you can place the code snippet there rather than on every page of your website. If you use Google Analytics, you can use the Google Analytics tracking code that’s already on your site instead of using the AdWords remarketing tag. 
  8. Save and publish your pages.
  9. Check that you've implemented the tag correctly with Google Tag Assistant, a Chrome extension that verifies Google code snippets and helps you solve errors (available in English only). Alternatively, you can check back in about a week to monitor your progress.
  10. After you've tagged your website, you can then create remarketing lists for each of your webpages. If you can't add the tag to your entire website, you can still add it to specific sections of your website and then create lists for each of those sections.

Updating your tag

If you already have a global site tag added to your site and want to start using dynamic remarketing, you only need to add a remarketing event snippet. The event snippet should be installed on pages that will track remarketing events like product pages or shopping carts. It can be placed anywhere in the code, after the global site tag. Here’s an example of a retailer's tag where the global site tag is blue, the event snippet and custom parameters are green, and dynamic unique values are highlighted yellow.

 

Important

Do not translate any of the custom parameter or values names, they should be used in English For example, use cart and not carrinho for Brazilian Portuguese.

Dynamic and custom parameters in the event snippet should use JavaScript Literal Object Notation, a format for transmitting structured data over a network connection. The global site tag (gtag.js) is a web tagging library for Google's site measurement, conversion tracking, and remarketing products.

The example below, shows the parameters for the "Retail" business type. You'll need to use the correct custom parameter names (such as ecomm_prodid) for your business type. See all of the custom parameters by vertical

<!-- Global Site Tag (gtag.js) - Google AdWords: 123456789 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-123456789"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments)};
  gtag('js', new Date());

  gtag('config', 'AW-123456789');
</script>
<!-- Event snippet for Example dynamic remarketing page -->
<script>
  gtag('event', 'page_view', {'send_to': 'AW-123456789',
   'ecomm_prodid': 'REPLACE_WITH_STRING_VALUE',
   'ecomm_pagetype': 'REPLACE_WITH_STRING_VALUE',
   'ecomm_totalvalue': 'REPLACE_WITH_STRING_VALUE'
  });
</script>

Was this article helpful?
How can we improve it?
Previous New
Tailor Your Ads with Dynamic Remarketing

Get Google's guide to Dynamic Remarketing. Learn how to create and optimize high-quality business data feeds to power remarketing. View the guide now.