Search
Clear search
Close search
Google apps
Main menu

Setup and installation

Install Tag Manager to add and manage Analytics page view tags, AdWords Conversion Tracking tags, and others in the Tag Manager user interface.

  1. Create an account, or use an existing account, at tagmanager.google.com.
  2. Create a new container for your website or mobile app.
  3. Install a container in your content.
    1. For web and AMP pages: Add the container snippet to your site and remove any existing tags.
    2. For mobile apps: Use the Firebase SDK to implement Tag Manager. Android | iOS
  4. Add, update and publish tags.

Manage accounts and containers

An account is the topmost level of organization in Tag Manager. Typically, only one account is needed per company, as all tags for a company's content can be be managed from this single account.

Manage multiple Tag Manager accounts from a single Google account
Each time you sign in to Google Tag Manager, you'll see the list of Google Tag Manager accounts to which you have access.

An account contains one or more containers, one for each type of property you own: web, iOS app, Android app, or AMP.

Create a new account and container

  1. In Google tag Manager, click Accounts > Create account.
  2. Enter an account name and optionally indicate whether you'd like to share data anonymously with Google and others.
  3. Click Continue.
  4. Enter a descriptive container name and select the type of content: Web, AMP, iOS, or Android.If setting up a mobile container, select whether you're using the Firebase SDK or one of the legacy SDKs.
  5. Click Create.
  6. Review the Terms of Service and click Yes if you agree to those terms.

When your new container first loads, you will be prompted with the web container installation code snippet, or to get started with Tag Manager as part of the SDK for your chosen mobile platform. Click OK to clear this dialog. You can always set up your container first and install the container snippet or SDK later.

Add a new container to an existing account

  1. In Google tag Manager, click Accounts > ⋮ next to the relevant account name.
  2. Choose Create Container.
  3. Repeat steps 4–6, listed above.

Install a container in your content

  1. In Google tag Manager, click Workspace.
  2. Near the top of the window, find your container ID, formatted as "GTM-XXXXX".
  3. Click your container ID to launch the Install Tag Manager box.
  4. Copy and paste the code snippets into your website as instructed. Below are tips for each content type.
  5. Verify or troubleshoot your installation with Tag Manager's Preview Mode and the Tag Assistant Chrome extension.

Web pages

  • Place the <script> code snippet in the <head> of your web page's HTML output, preferably as close to the opening <head> tag as possible, but below any dataLayer declarations.
  • Place the <noscript> code snippet immediately after the <body> tag in your HTML output.
Note the portion of the code GTM-XXXXXX: This is the unique identifier for each of your containers. Be sure to remove any tags that are now in the Google Tag Manager Container (e.g. Google Analytics, AdWords Conversion Tracking, etc) from the site pages at the same time.

AMP pages

  • Place the <script> portion of the JavaScript snippet just above the closing </head> tag.
  • Place the <amp-analytics> section immediately after the opening <body> element.

Mobile apps

Implementation of Tag Manager for mobile apps is done in conjunction with Use the Firebase SDK to implement Tag Manager in mobile apps. A new container is required. Visit the Tag Manager developer documentation to learn how to get started with Android and iOS.

Add, update and publish tags

Now that a container is installed, you're ready to add new tags in Google Tag Manager.

  1. In Google Tag Manager, click Accounts and select your account.
  2. Click Tags from the navigation menu. Learn more
    • To add a tag: Click New. Select the tag type (for example, Google Analytics) and specify triggers for when the tag should fire.
    • To edit a tag: Click a tag in the list and make changes on the "Edit Tag" page. For example, you might update the triggers for when the tag should fire.
    • To delete a tag: Click a tag in the list. On the "Edit Tag" page, click More Actions menu (three dots) in the upper right corner of the screen and choose Delete.
  3. Previewing gives you an opportunity to perform quality assurance (QA) on your site or app and make sure everything looks and behaves as expected. On the web, you can use the debugging option to see which tags fire as you browse and interact with the site.
  4. When you're ready, click Publish in the upper-right corner of the screen to begin publishing your changes. Enter a Version Name and Version description to describe what was changed, then click Publish.
Was this article helpful?
How can we improve it?