Set up your Google tag

The Google tag lets you send data from your website to connected Google product destinations to help you measure the effectiveness of your website and ads. The Google tag is currently only accessible and configurable from Google Ads and Google Analytics 4.

A concept illustration demonstrating how to set up your Google tag.

As website technologies such as cookies continue to evolve due to privacy, browser and regulatory changes, having high-quality, site-wide tagging is important to help ensure that you’re getting the most accurate measurement.

To start collecting data, you need to put the Google tag in the code of your website. The Google tag must be on every page that has data that you want to collect.

Once you've set up your Google tag, you can:

  1. Configure your Google tag settings
  2. Manage your Google tag (optional)
  3. Manage your Google tag users (optional)
Note: All global site tags have been converted into Google tags. If you have a global site tag on your website, you don’t need to update your site to use the Google tag.

What is a destination?

A destination is a Google measurement product account that's connected to, shares configuration with and receives data from a given tag. A destination ID is an identifier that represents the destination; i.e. the connected Google product. These IDs are primarily used by the tag to load destination-specific settings and to route events.

Currently, only the following can be destinations:

  • Google Ads accounts
  • Web data streams in Google Analytics 4 properties

How to find your tag IDs

You can find all of your tag IDs in the 'Your Google tag' section of the 'Configuration' tab.

An illustration demonstrating where to locate Tag IDs on Google tag.

Tag ID: A tag ID is an identifier that you put on your page to load a given tag. Your tag ID is displayed under the Google tag on the left side of the Google tag 'Configuration' tab. By default, only a single tag ID is displayed when there's only one destination.

A single tag can have multiple tag IDs. You’ll see a 'main' ID displayed. Sometimes multiple tag IDs are displayed after combining tags. If you remove a destination, it doesn’t change existing tag IDs.

Note: If you combine or split your tags, the main tag ID displayed in the tagging instructions snippet can change. You don’t need to retag your page if this happens. As long as you have one of the tag IDs on the page, it will load the same tag. This can be helpful if you're trying to deploy a tag via a CMS integration (also known as a 'website builder'), but the CMS integration doesn’t accept a GT- tag ID. You can use an alias (AW-XXXXX or G-XXXXX) that's supported by the CMS integration.

Destination ID: A destination ID is an identifier that represents the connected Google product. These IDs determine which Google product accounts receive events sent by this tag.

For Google Ads, the destination ID is usually the same as the conversion tracking ID. For Google Analytics, the destination ID is usually the same as your web data stream's Measurement ID.

To see the destination ID, click the destination name. The 'Destinations' section of the 'Manage Google tag' tab lists all of your destinations, their IDs and the date when they were added.

Set up your Google tag from Google Ads instructions

Before you set up your Google tag, make sure that you’ve set up conversion tracking for your website.
  1. Sign in to your Google Ads account.
  2. In the top right-hand corner, click the tools and settings icon Tools icon, and under 'Setup', click Google tag.
  1. In the 'Installation instructions' page, select either 'Install with a website builder' or 'Install manually':
    1. Use 'Install with a website builder' if you manage your site using a website builder (or 'CMS platform', like Wix or Wordpress). Select your website builder and follow the instructions to finish setting up your Google tag without making changes to your code. If you're trying to deploy a tag via a CMS/Website builder integration, but the CMS integration doesn’t accept a GT- tag ID, you can use an alias (AW-XXXXX or G-XXXXX) that's supported by the CMS integration.
    2. If you choose to install manually, go to the 'Install manually' section. On the screen, you’ll see the JavaScript snippet for your Google tag. Copy and paste your entire Google tag snippet in the code of every page of your website, immediately after the <head> element:

      <!-- Google tag (gtag.js) -->

      and ending with

      </script>

<!-- Google tag (gtag.js) -->

<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>

Note: As a best practice, don’t add more than one instance of your Google tag to each page of your website.

When you’ve set up your tag, you need to configure your Google tag settings.

You can launch Tag Assistant to test your conversion action/data collection.

Set up your Google tag from Google Analytics instructions

  1. Sign in to your Google Analytics account.
  2. Click Admin.
  3. At the top of the 'Property' column, use the drop-down selector to select the property that contains the data stream for which you want to set up your Google tag.
  4. In the 'Property' column, click Data streams.
  5. Click the data stream that you want to edit.
  6. Under 'Google tag', click Configure tag settings.
  1. In the 'Your Google tag' section, click Installation instructions.
  2. In the 'Installation instructions' page, select either 'Install with a website builder' or 'Install manually':
    1. Use 'Install with a website builder' if you manage your site using a website builder (or 'CMS platform', like Wix or Wordpress). Select your website builder and follow the instructions to finish setting up your Google tag without making changes to your code.
    2. If you choose to install manually, go to the 'Install manually' section. On the screen, you’ll see the JavaScript snippet for your account's Google tag. To establish a connection between your website and Google Analytics, copy and paste your entire Google tag snippet in the code of every page of your website, immediately after the <head> element. Your Google tag is the entire section of code that appears, beginning with:

      <!-- Global tag (gtag.js) -->

      and ending with

      </script>
Note: As a best practice, don’t add more than one instance of your Google tag to each page of your website.

It may take up to 30 minutes for data collection to start. You can then use the Realtime report to verify that you're receiving data.

When you’ve set up your tag, you need to configure your Google tag settings.

You can launch Tag Assistant to test your conversion action/data collection.

No tag found

It's possible for a destination to get in a state where it's not attached to a Google tag. In order for that destination to receive data, it must be connected to a Google tag.

If your destination isn't connected to a tag, you'll be notified when you open the Google tag page. You can choose to connect the destination to an existing Google tag or to create a new Google tag.

Related links

Was this helpful?
How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
Search Help Centre
true
true
true
true
102259
false
false