Tag your website using Google Ads

To provide a comprehensive and consolidated view of your Audiences and make audience management and optimisation simpler, you’ll find the following improvements in Google Ads:

  • New audience reporting
    Detailed reporting about audience demographics, segments and exclusions is now consolidated in one place, the 'Audiences' tab within the left page navigation menu. You can also easily manage your audiences from this report page. Learn more about Audience reporting
  • New terms
    We’re using new terms on your Audience report and throughout Google Ads. For example, 'audience types' (these include similar, custom, in-market and affinity) are now referred to as audience segments and 'remarketing' is now referred to as 'your data'. Learn more about the updates to Audience terms and phrases
Note: The global site tag (gtag.js) is now the Google tag. With this change, new and existing gtag.js installations will get new capabilities to help you do more, improve data quality and adopt new features – all without additional code. Learn more About the Google tag.

Tag your website with the Google tag to set up an audience source in your website or apps that helps you reach people who have visited your website or who have used your app. The Google tag is a web tagging library for Google's site measurement, conversion tracking and products using your data segments. It’s a block of code that adds your website visitors to your data segments, allowing you to target your ads to these visitors.

For dynamic remarketing, you’ll also use event snippets, which passes specific data to Google Ads about your website visitors and the actions that they take on your site.

This article contains instructions for how to set up tracking using the Google tag, including using snippets for tracking. You can skip to one of the following sections:

Additionally, learn how to tag your site for dynamic remarketing or how to set up your app for dynamic remarketing.

Before you begin

  • You need to be familiar with your website's code. Otherwise consider working with a developer or someone with a technical background.
  • Your data segments that are comprised of your website visitors and app users 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 data segments based on the rules that you've set.
Note: Google Ads does not permit the implementation of tags on pages related to policy-restricted offers. Learn more about the Personalised advertising policy

Instructions

Use the Google tag to create audience segments comprised of your website visitors and app users

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

When you’ve installed the Google 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 your data segments comprised of your website visitors and app users.

You must install the Google tag on every page of your website, but you need only one Google tag for each Google Ads account.

Setting up event snippets

The event snippet can be used to pass specific data to Google Ads about your website visitors and the actions that 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 dynamic remarketing lists as well.

You can also use the event snippet to measure additional actions that should be counted as dynamic 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

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

Create or edit your Google tag and event snippet

  1. Sign in to Google Ads.
  2. Click on the tools icon Google Ads | tools [Icon] in the upper right and click Audience Manager under the section labelled 'Shared library'.
  3. On the left, click Your data sources. This opens a group of sources from which you can create your data segments and audience segments.
  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 top right 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: segments that include your website visitors and app users, or dynamic remarketing data, which includes specific attributes or parameters.
    • You can also choose to include the user ID parameter with the tag. 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 Google tag and event snippet will be ready for use. You can copy the code, use Google Tag Manager, download the tag or email the tag to a web developer.
    • To integrate remarketing into your site, copy the code and paste it between the <head></head> tags of the website.
      The event snippet should not be copied and pasted as-is for use on your website. It contains placeholder values that your web developer must dynamically populate when they integrate the snippet code into their web server. Learn how to use event parameters for your business type
    • The Google tag must be added into every page of your site. Whereas 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 Google tag using Display & Video 360, Search Ads 360, Campaign Manager 360, Google Analytics or another Google Ads account, it isn’t necessary to add it to your website again. However, for both conversion tracking and your data segments 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 Google tag right above the </script> end tag. In the following example, 'TAG_ID' stands for your account’s conversion ID:

      gtag('config', 'TAG_ID');

      If you have the Google tag implemented from products other than those listed above, it needs to be customised to enable measurement with Google Ads. If you're 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 following 'What’s Next' confirmation screen, click Done again.
    • Optional: If you previously added the Google tag from another Google product such as Google Analytics, make sure that you add the 'config' command from the global site 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 Google tag box.
      <script async src="https://www.googletagmanager.com/gtag/js?id=TAG-ID"> </script>
      <script>
      window.dataLayer = window.dataLayer | | [ ] ;
      function gtag ( ) {dataLayer.push (arguments ) ; }
      gtag ('js' , new Date ( ) ) ;
      gtag ('config', 'TAG-ID') ;
      </script>

Advanced options

Disable the collection of your data

You can choose to disable the collection of personalised advertising data for users who do not wish to view personalised ads or for your own compliance reasons. You can modify the global site tag and disable the collection of personalised advertising data for particular users on your site, or choose to exclude all users from California in the Audience Manager section of your Google Ads account.

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, your Google 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 your data 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 to do this because 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

Search
Clear search
Close search
Google apps
Main menu
Search Help Centre
false
false
true
73067
false
false
false