Use the global site tag for Google Ads conversion tracking

30/11/2019

To streamline your experience with using website code across Google products, you can use the global site tag to track your Google Ads conversions. Starting in October 2017, when you create a website conversion action in the new Google Ads experience, you’ll see a global site tag instead of the previous conversion tracking tag. This tag should be installed on every page of your website. You’ll also have to add another piece of code, an event snippet or a phone snippet -- depending on the type of conversion you’d like to track, to certain pages on your site. These snippets work in unison with the global site tag to track conversions. 

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

If you have the previous conversion tracking tag installed on your website, it will still work; however, we recommend that you use the new conversion tracking tag for more accurate conversion measurement.

Benefits

  • Faster and easier integration with other Google products: 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.
  • More accurate conversion tracking: Using the global site tag sets new cookies on your domain, which will store information about the ad click that brought a user to your site. This ensures that Google Ads can measure conversions more accurately. The global site tag lets you specify which interactions with your website should be counted as Google Ads conversions.
  • Complete coverage of all conversions: If you use the previous conversion tracking tag, modified for a pixel-only implementation, Google Ads is not able to observe all of your conversions. The global site tag ensures that all of your conversions are accounted for.

Note that your Google Ads conversion tracking tags are able to use the click information from the new cookies that are set on your domain. Please ensure you're providing users with clear and comprehensive information about data collection, and obtaining consent where legally required.

How the global site tag works

The global site tag works in unison with another piece of code, an event snippet or a phone snippet, to track your conversions. 

  • If you’re tracking website conversions, the event snippet tells the global site tag when to track a conversion.
  • If you’re tracking calls to your website, the phone snippet replaces your business phone number with a Google forwarding number.

When you set up conversion tracking for your website, you’ll be able to view and copy the global site tag for your account, as well as any snippets that should be used with the tag. The code snippets you’ll find below are examples only and won’t work on your website. 

Global site tag

The global site tag snippet should be placed on all pages of your website, in the section of your HTML pages. If you previously installed a global site tag while creating another conversion action from the same Google Ads account (or if a manager account had installed it while creating another conversion action in your account), you shouldn’t add the global snippet again. If you installed a global site tag on your website from another Google product (example: Google Analytics) or from another Google Ads account, follow the instructions to adapt the tag so it works for your Google Ads account.

Here's an example of the global site tag:


  
  

Event snippet

For website conversion tracking to work, the event snippet should be installed on the conversion page itself. It can be placed anywhere in the code, after the global tag snippet. We recommend placing it within the section for the best tracking accuracy.

Here’s an example of an event snippet:

    
    

Phone snippet

The phone snippet should be added to the pages on your website where the phone number you’d like to track appears. The phone snippet should be placed right after the global site tag.

Here’s an example of a phone snippet:

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:

  
  

  

To add support for your Google Ads account, simply add the highlighted line to your global site tag, replacing “AW-CONVERSION_ID” with the unique ID supplied to you when you set up your conversion tracking tags

  
  

  

To disable the collection of remarketing data, add the highlighted gtag('set') command below to your global site tag:

 
 

 

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. Just add the event or phone snippet. 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 conversion tracking tag

Follow the steps to set up conversion tracking in the new Google Ads experience.

Security and privacy for website tracking

Google's security standards are strict. Only pages containing the Google conversion tag are tracked through this program. We use data encryption and secure servers.

Please ensure you're providing users with clear and comprehensive information about the data you collect on your websites, and getting consent for that collection where legally required.

* Nguồn: Google