The Google tag (gtag.js) is one piece of code you add to every page of your website to send data to Google products such as Google Ads, Google Analytics and Campaign Manager 360. In Google Ads it is the base of website conversion tracking, and a single tag can send data to several accounts.
Google describes the Google tag as "a single tag you can add to your website that allows you to use a variety of Google products and services." Instead of separate code for each product, you install one tag across the whole site and connect it to destinations such as your Google Ads account or Google Analytics 4 property.
It replaced the old global site tag. Google says all global site tags have been converted into Google tags, so if your site still has one, you don't need to update it.
What does it do for Google Ads?
For website conversion tracking, Google Ads uses two pieces of code:
| Google tag | Event snippet | |
|---|---|---|
| Where it goes | Every page of your website | The conversion page itself |
| What it does | Sets cookies on your domain that store an identifier for the user or the ad click that brought them | Tells Google Ads that a specific conversion happened |
Google says the Google tag should be on every page, and the event snippet on the page where the conversion happens. If you already installed the Google tag while setting up another conversion action in the same Google Ads account, Google says not to add it again. Next step: how to set up conversion tracking.
What is a tag ID?
Each Google tag has a tag ID. Google gives examples like GT-XXXXXXXXX, G-XXXXXXXXX and AW-XXXXXXXXX. After you combine tags, one Google tag can show several IDs: the first is the main one, but Google says they can be used interchangeably when you add the tag to your site.
One tag can also send data to more than one place. Google says that if you use both Google Ads and Google Analytics, you only need to set up the Google tag in one of them and add the other product as a destination. Should you then count conversions from the tag or from GA4? See GA4 key events or the Google Ads tag.
How do you install it?
In Google Ads, go to Tools, then Data Manager, find your Google tag and click Manage. Then pick one route:
- Install manually. Copy the code and paste it on every page, immediately after the opening
<head>element. - Google Tag Manager. Google points to it for more complex measurement needs. Step by step: how to set up Google Tag Manager for Google Ads.
- Website builder or CMS. WordPress, Shopify, Wix and similar platforms have their own setup routes.
To check it, enter your site's URL in the Test your website section and click Test. Google says data collection can take up to 30 minutes to start. After that, test your conversion tracking end to end.
What I check first in an account I take over: is the same tag installed twice, once in the site code and once through Tag Manager? Pick one route and remove the other. If your site serves visitors who must give cookie consent, also read basic vs advanced consent mode, and if you're thinking about moving tagging off the browser, what server-side tagging is.
Sources
- Tag Manager Help: About the Google tag - https://support.google.com/tagmanager/answer/11994839
- Google Ads Help: Use the Google tag for Google Ads conversion tracking - https://support.google.com/google-ads/answer/7548399
- Google Ads Help: Set up your Google tag in Google Ads - https://support.google.com/google-ads/answer/15756614
- Google Ads Help: Set up your Google tag - https://support.google.com/google-ads/answer/12002338
- Tag Manager Help: Google tag ID - https://support.google.com/tagmanager/answer/12326985
