Changes to the Google Ads remarketing tag

To streamline your experience with using website code across Google products, we’ve made some changes to the Google Ads tag. If you've set up the Google Ads tag for standard remarketing or dynamic remarketing in the new Google Ads experience, you'll see a global site tag, which should be deployed site-wide, along with an optional event snippet. The event snippet works in unison with the global site tag to measure meaningful user activity on your website, such as viewing a product or service, starting a checkout or completing an online purchase. These snippets are a replacement of the previous remarketing tag, which will still work.

This article explains why you should use the global site tag with the optional event snippet, and how to implement it properly.

Note: If you’re using Google Tag Manager to manage your global site tag, you can also implement remarketing using the Google Ads remarketing tag template, which is available in Google Tag Manager. If you already have the Google Tag Manager container code on your website, it's not recommended to implement the global site tag.

Before you begin

Keep in mind that:

  • The global site tag is currently only available for website conversions and remarketing in the new Google Ads experience.
  • For standard remarketing to work (Google Ads tag setup to “Collect standard data available from this data source”), you must have a global site tag on each page of your website.
  • For dynamic remarketing to work (Google Ads tag setup to “Collect specific attributes or parameters to personalize ads”), you must have a global site tag on each page of your website and an event snippet for each remarketing event that’s relevant for your business type. (Note that you aren’t required to tag any non-commercial pages of your site). You’ll need to integrate the event snippet with your website's source code so that it is triggered in response to a specific user action, such as viewing a product or making a purchase. Learn more about tracking remarketing events for your business type
  • You need to provide users with clear and comprehensive information about data collection, and obtain their consent where legally required. For users who do not wish to view personalized ads, you may disable the collection of remarketing data. Learn how to modify global site tag to disable the collection of remarketing data for specific users.
If your setup uses JavaScript from the previous version of the Google Ads tag, it will continue to work. If your setup uses the non-JavaScript image tag, it's recommended that replace it and you use the new tag to have full functionality.

How the new Google Ads tag works

The new Google Ads tag consists of a global site tag and an optional event snippet, which work in unison to measure your remarketing events. The event snippet tells the global site tag when to send more detailed remarketing event data. You’ll see the code snippets for the global site tag and the optional event snippet when you set up the Google Ads tag data source.

Global site tag

The global site tag snippet should be placed on all pages of your website, in the <head> section of your HTML pages. You only need one global site tag snippet across your entire website. If you've installed a global site tag from a previously created conversion action or remarketing event from the same Google Ads account, you shouldn’t add the global snippet again. You may also have a global site tag snippet obtained from a Google Analytics account or from another Google Ads account. In that case, follow the instructions to how to adapt an existing global site tag for your Google Ads account.

Here's an example of the global site tag:

<!-- Global site tag (gtag.js) - Google Ads: 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>

The code snippet above is an example only and won’t work on your website. When you tag your site for remarketing, you’ll be able to view and copy the global site tag for your account.

The global site tag is not only used by Google Ads, but also by other Google products such as Google Analytics. If you use these products, the global site tag makes website implementation easier by providing a unified tagging experience.

Event Snippet

The event snippet is used to measure user activities, such as signing into an account, or browsing a product or service. Information about these activities is measured in the event snippet using event parameters. Install the event snippet on every page of your site that measures specific remarketing events. It can be placed anywhere in the code, after the global tag snippet. We recommend placing it within the <head> section for the best measurement accuracy.

Here’s an example of an event snippet:

<!-- Event snippet for Example dynamic remarketing page -->
<script>
gtag('event', 'add_to_cart', {
    'value': 345.89, 
   items': [{
      'origin': 'NYC'
      'destination': 'PAR',
      'google_business_vertical': 'flights'
    },
    {
      'origin': 'PAR'
      'destination': 'LON',
      'google_business_vertical': 'flights'
    }, 
    {
      'id': '123456',
      'location_id': 'LON',
       'google_business_vertical': 'hotels'
    }]
});
</script>

The code snippet above is an example only and won’t work on your website. When you set up remarketing for your website, you’ll be able to view and copy the event snippet for your account.

How to adapt an existing global site tag for your Google Ads account

If you already have a global site tag on each page of your website, you can configure it to send data to multiple Google Ads or Google Analytics accounts. Let’s take the example of a global site tag from a Google Analytics account. The global site tag would look like this:

 <!-- Global site tag (gtag.js) - Google Analytics -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>

  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'GA_TRACKING_ID');
  </script>

To add support for your Google Ads account, simply add the highlighted line to your global site tag, replacing "AW-123456789" with the unique ID supplied to you when you get your remarketing tags.

 <!-- Global site tag (gtag.js) - Google Analytics -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>

  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'GA_TRACKING_ID');
    gtag('config', 'AW-123456789');
  </script>


Once you’ve made this change, you don’t need to add the global site tag snippet obtained from your Google Ads account to your website. If you’re using dynamic remarketing or event parameters, just add the event snippet on the page of your site where the event occurs. Note that you can re-use the same global snippet for multiple Google Ads or Google Analytics accounts. For each additional Google Ads or Google Analytics account you want your tag to support, add a new ‘config’ command that contains the ID of the account (as demonstrated in the sample code above, which has separate ‘config’ commands for Google Analytics and Google Ads).

How to use the new remarketing tags

Follow the steps to set up remarketing for your website in the new Google Ads experience.

Advanced options

Disable the collection of remarketing data

You can choose to disable the collection of remarketing data for users who do not wish to view personalized ads by using the parameter: allow_ad_personalization_signals. Learn how to modify the global site tag in order to disable the collection of remarketing data for specific users.

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue