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.

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 Personalized advertising policy.

Instructions

The new Google Ads experience is now the exclusive way for most users to manage their accounts. If you’re still using the previous AdWords experience, choose “previous” below. Learn more

Setting up remarketing for the first time

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

The global site tag sets a new cookie on your site which:

  • collects information about the ad click that brought a visitor to your site and
  • adds website visitors to standard remarketing lists in your AdWords account.

You must install the global site tag on every page of your website, but you need only one global site tag for each AdWords account. The event snippet can be used to track additional actions that should be counted as remarketing events. Install this snippet on site pages you'd like to track, right after the global site tag in the <head></head> section.

Please ensure 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 AdWords.
  2. Click on the tool icon  in the upper right and click Audience Manager under the section labeled “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 “AdWords 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 its upper right of the “AdWords 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 the user ID parameter with the tag. This will collect the user IDs of people who visit your website so you can show more targeted ads.
    • 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.
    • 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 you want to track for dynamic remarketing events.
  8. Click DONE.
  9. In the following “What’s Next” confirmation screen, click DONE again.
    • Optional: If you previously added the global site tag from another Google product such as Google Analytics, make sure you add the 'config' command from the AdWords 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 customer 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>
    • Optional: If you’re using an event snippet for remarketing and don’t want the global site tag to send an extra hit, add the highlighted portion below to your global site tag’s ‘config’ command.
          gtag('config', 'AW-123456789', {'send_page_view': false});

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 using the parameter: allow_ad_personalization_signals. This parameter will let you disable the usage of the data for personalized ads and the default value of the parameter will be set to true. When you set the parameter’s value to false, it will disable the usage of the data for personalized 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 do not wish to view personalized ads using the parameter: allow_ad_personalization_signals. This parameter will let you disable the usage of the data for personalized ads and the default value of the parameter will be set to true. When you set the parameter’s value to false, it will disable the usage of the data for personalized 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 that 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 } );

It's not recommended doing this because it will lead to less accurate conversion measurement.

Was this article helpful?
How can we improve it?
Previous New