Tag your site for remarketing

You can show ads to people who've visited your website by adding the remarketing global site tag and event snippets to your website. The global site tag is a web tagging library for Google's site measurement, conversion tracking and remarketing products. It’s a block of code that adds your website visitors to remarketing lists, which will allow you to target your ads to these visitors.

This article contains instructions for how to set up remarketing, where to get your remarketing snippets, and how to tag your site for remarketing. You can skip to one of the following sections:

Additionally, learn how to tag your site for dynamic remarketing.

Before you begin

  • You need to be familiar with your website's code. Otherwise, consider working with a web developer or someone with a technical background. 
  • Your remarketing lists need to have a minimum number of visitors in order for your ads to show.
  • Once you tag your website, people visiting your website will be automatically added to your remarketing lists based on the rules you've set. 
Google Ads does not permit the implementation of tags on pages related to policy-restricted offers. Learn more about the Personalised advertising policy

Instructions

Setting up remarketing for the first time with the Google Ads tag

To set up website remarketing for the first time in the new Google Ads experience, you'll need to add a code snippet to your website: the global site tag and the optional event snippet.

Once you’ve installed the global site tag, it will capture information about the pages viewed by your website visitors. This information includes the page URL and title, and is used to create remarketing lists. The event snippet can be used to pass specific data to Google Ads about your website visitors and the actions they take on your site, such as viewing a product, completing purchases, filling in online forms, and setting up registration. The data passed to the event snippet can be used to create remarketing lists, as well. 

You must install the global site tag on every page of your website, but you need only one global site tag for each Google Ads account. The event snippet can be used to measure additional actions that should be counted as remarketing events. Install this snippet on site pages that you'd like to measure, where the event occurs. These events include when a customer makes a purchase on a retail site, or searching for airline tickets on a travel site. Learn more about event parameters for different business types

Please ensure that you're providing users with clear and comprehensive information about data collection, and obtaining consent where legally required.

Create or edit your global site tag and remarketing event snippet

  1. Sign in to Google Ads.
  2. Click the tools icon  in the upper right-hand corner, then click Audience manager under the section labelled Shared library.
  3. On the left, click Audience sources. This opens a group of sources from which you can create remarketing lists.
  4. In the 'Google Ads tag' card, click SET UP TAG.
    • If you've already set up a tag, select Edit source from the 3-dot icon 3 dot icon in the upper right-hand corner of the 'Google Ads tag' card. If you’re just getting the code, skip to step 6.
  5. Select which type of data the tag will collect, standard data or specific attributes/parameters.
    • You can also choose to include with the tag a parameter that collects user IDs. Including the user ID parameter allows you to pass a user ID to the tag for each website visitor, which enables features like cross-device linking.
    • If you select specific attributes or parameters, you can choose the business type that best represents your products and services. 
  6. Click CREATE AND CONTINUE.
    • This button will say SAVE AND CONTINUE for an existing tag.
  7. When the installation screen appears, your global site tag and event snippet will be ready for use. You can copy the code, use Tag Manager, download the tag or email the tag to a webmaster.
    • To integrate remarketing into your site, copy the code and paste it between the <head></head> tags of the website.
      Alert: The event snippet should not be copied and pasted 'as is' for use on your website. It contains placeholder values that your webmaster must dynamically populate when they integrate the snippet code into their web server. Learn how to use event parameters for your business type
    • The global site tag must be added into every page of your site. The event snippet only needs to be added into the specific pages that you want to track for dynamic remarketing events.
      Note: If you have already set up the global site tag using Display & Video 360, Search Ads 360, Campaign Manager, Google Analytics or another Google Ads account, it isn’t necessary to add it to your website again. However, for both conversion tracking and remarketing to work, you’ll be required to add the config command (a piece of code that contains your conversion ID) to every instance of the global site tag right above the </script> end tag. In the following example, 'AW-CONVERSION_ID' stands for your account’s conversion ID:

      gtag( 'config', 'AW-CONVERSION_ID');

      If you have the global site tag implemented from products other than those listed above, it needs to be customised to enable measurement with Google Ads. If you are using the old event snippet, you may be prompted to change to the new event snippet, which is recommended.

  8. Click DONE.
  9. In the 'What's Next' confirmation screen which follows, click DONE again.
    • Optional: If you previously added the global site tag from another Google product such as Google Analytics, make sure that you add the 'config' command from the Google Ads tag (highlighted below) to every existing instance of the tag. Note that 'AW-123456789' is only an example of an ID. You'll need to replace this part of the 'config' command with your accounts' conversion ID in the global site tag box.
          <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>

Using the Google Analytics tag in place of the Google Ads tag

To use your Google Analytics tag instead of the Google Ads remarketing tag, you’ll need to have the following:

  • Google Analytics tag on your website
  • Linked Google Ads and Google Analytics accounts (when linking your accounts, you'll need administrative access to the Google Ads account and edit access to the Google Analytics account)
  • Remarketing and advertising features enabled in Google Analytics

For detailed instructions, see Enable remarketing and advertising reporting features in Google Analytics

 

Disable the collection of remarketing data

You can choose to disable the collection of remarketing data for users who don't wish to view personalised ads using the parameter: allow_ad_personalization_signals. This parameter lets you disable the usage of data for personalised ads (its default value is set to true). When you set the parameter’s value to false, it will disable the usage of the data for personalised ads. This parameter does not disable conversion tracking.
Learn how to modify the global site tag to disable the collection of remarketing data for specific users

Advanced options 

Disable the collection of remarketing data

You can choose to disable the collection of remarketing data for users who don't wish to view personalised ads using the parameter: allow_ad_personalization_signals. This parameter lets you disable the usage of data for personalised ads (its default value is set to true). When you set the parameter’s value to false, it will disable the usage of the data for personalised ads. This parameter does not disable conversion tracking.
Learn how to modify the global site tag to disable the collection of remarketing data for specific users

Advertiser cross-device linking

Advertiser cross-device linking allows you to use your own user data to help show ads to users who have visited your website or app on their various devices or browsers. If you're setting up Advertiser cross-device linking, you need to comply with the Advertiser cross-device linking policy.

Learn more About cross-device linking with user ID parameters.

Disable the first-party cookie setting

To ensure that Google Ads can measure all of your conversions, regardless of the browser that your site visitor is using, the remarketing tag sets new cookies on your domain which will store information about the ad click that brought people to your website.

If you don’t want the remarketing tag to set first-party cookies on your site’s domain, add the following line to the tag configuration before you load the script tag:

var google_conversion_linker = false;

If you’re using conversion_async.js, add the highlighted portion below to the google_trackConversion call:

window.google_trackConversion( { google_conversion_linker : false } );

Doing this isn't recommended as it will lead to less accurate conversion measurement.

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue