Set up your Google tag in Google Tag Manager

Google Tag Manager is a tag management system that allows you to set up and manage tags on your site without changing your website's code. To use Tag Manager, you add 2 snippets of code to each page of your website. After you add the snippets to your code, you don't need to change your code much after that. Instead, you can set up and manage your tags through the Google Tag Manager website. Learn more about Google Tag Manager.

If you’re using a website builder or CMS like Wordpress, Shopify, or Wix, learn how to Install your Google tag with a website builder or CMS.


On this page


Before you begin

If you already have a Google tag snippet on your site and want to upgrade to using only Tag Manager, follow the steps in the migration guide.


Where is my Google tag ID in Google Tag Manager?

How to find your Google tag ID and use it for website tracking

For subtitles in your language, turn on YouTube captions. Select the settings icon Image of YouTube settings icon at the bottom of the video player, then select "Subtitles/CC" and choose your language.


  1. Go to Google Tag Manager.
  2. Sign in to your Google Account.
  3. Under Your Google tag, click the Google tag.
  4. Under Tag details, copy the Google tag ID.

Set up your Google tag in Google Tag Manager

Step 1: Create a Google tag

  1. Go to Google Tag Manager.
  2. Select the container you want to configure.
  3. In the Tags menu, click New.
  4. Enter a name for the tag
  5. In the Tag Configuration box, select Google tag.
  6. In the Tag ID field, enter your Google tag ID.
  7. Click Save.

Optional Settings

You can set up additional configuration options to govern how your Google tag communicates with destinations. If you set up the Google tag and want to keep all the default settings, you can skip to Step 2: Create a trigger.

  • Global parameter settings: If you need to establish common context across several Google tags, you can specify global parameters using gtag.js directly on your website. Learn how to reuse parameters across multiple tags, in the developer documentation.
    • Note: Global parameters are read by all Google tags on your website. Use this option only for non-sensitive data.
  • Configuration settings: You can specify additional configuration parameters that influence the Google tag settings.
  • Shared event settings: You can specify additional parameters that are sent with every event, like the currency of a price. Event parameters are only valid for the tag you add them to.
  • Send data to a tagging server: Server-side tagging allows you to move some tags off of your website or app and onto a server instead, which allows you to improve performance. Learn more about Client-side tagging vs. server-side tagging.
    • To send all events to a Tag Manager server container instead of Google Analytics, you need to configure the following parameter:
      1. Open the Configuration settings menu.
      2. Set up the server container URL by adding a new configuration parameter:
        • Name: server_container_url
        • Value: Set to the server container URL of your Tag Manager server container
  • Set up user properties: User properties are attributes that describe groups of your user base, such as their language preferences or geographic locations. You can use user properties to define audiences. For example, you can set a user property called favorite_food, which you can use to record each user's favorite food. You can use the data to segment users by their favorite food.
    • Analytics automatically collects some user dimensions so you don't have to define user properties for them. You can set up to 25 additional user properties per Google Analytics 4 property.
    • To measure custom user properties you need to create a new Google Tag Event Settings variable and then assign it to the Google tag.

Step 2: Create a trigger

Set up a trigger to load the Google tag when someone loads your website.

  1. To ensure that the Google tag fires before other triggers, click Triggering and use the “Initialization - All pages” trigger. Learn more about Page triggers.
  2. Name the tag.
  3. Click Save.

Step 3: Publish the container

To update your website with the latest changes, click Submit.


Next steps

It may take up to 30 minutes for data collection to start. After data collection has started, verify your Google tag.

To set up more tags in Tag Manager, see your guide to Google Tag Manager.


Related links

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
4719094476564382663
true
Search Help Center
true
true
true
true
true
102259
false
false