Search
Clear search
Close search
Google apps
Main menu

Setup and installation

To get started managing your tags using Google Tag Manager:

  1. Go to tagmanager.google.com to create a Google Tag Manager account (or to access an existing account).
  2. Create a container for your site or app.
  3. For websites: Add the container snippet to your site while removing any existing tags.
    For mobile apps: Implementation of Tag Manager for mobile apps is done in conjunction with the Firebase SDK. See the Android or iOS documentation for more information.

You’re then ready to add tags (such as Google Analytics and AdWords Conversion Tracking tags) to your site via the Google Tag Manager user interface.

In this article:

Creating an account and container

The account is the topmost level of organization in Google Tag Manager. Typically, only one account is needed per company. Tags for all the company’s websites can be be managed from this single account.

You can create and/or administer multiple Google Tag Manager accounts from a single Google account. This allows you to conveniently manage tracking and campaigns for more than one company. Each time you sign in to Google Tag Manager, you’ll see the list of the Google Tag Manager accounts to which your Google Account has access.

  1. From the Home/All Accounts page in Google Tag Manager, click Create Account. (You can always get to this screen by clicking on the Tag Manager icon in the far upper left corner of the screen.)
  2. Enter an account name, optionally select the checkboxes to enable sharing data anonymously with Google and others and click Continue.
  3. Enter a container name when prompted in the Setup Container dialog. Select the container for Web, iOS, or Android. If setting up a mobile container, select whether you're using the Firebase SDK or one of the legacy SDKs. Click Create.
  4. Review the Terms of Service and click Yes if you agree to those terms.
  5. 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.)

Adding the container to web pages

A container snippet is provided for each web container. To install the container snippet:

  1. Near the top of your workspace's home screen, you will see your container ID number (formatted as "GTM-XXXXX"). Click it to launch the Install Tag Manager box.
  2. Copy and paste the code snippets into your website. The JavaScript snippet will be placed in the <head> of your web page's HTML output, and the <noscript> section should appear immediately after the opening <body> element. For best results, the JavaScript portion of the snippet should be placed as close to the opening <head> element as possible, but below any dataLayer declarations. See our developer site for further details.
    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.
  3. To help verify or troubleshoot your installation, you can use Tag Manager's Preview Mode and the Tag Assistant Chrome extension.

Learn more at the Google Tag Manager developer site.

Adding the container to mobile apps

Implementation of Tag Manager for mobile apps is done in conjunction with the Firebase SDK and requires a new container.

Visit the Tag Manager developer documentation to learn how to get started with Android and iOS.

Creating additional containers for existing accounts

Often you will need additional containers in your account. For instance, you may want to add another container for an additional website or mobile app. To add an additional container to an account:

  1. In Google Tag Manager, select an account. The default workspace for the selected container appears.
  2. Click Admin in the top nav bar.
  3. From the Containers dropdown menu, choose Create Container…
  4. Enter a container name when prompted. Select if you will use the container for Web, iOS, or Android, choose between Firebase (recommended) or Legacy, and click Create.

Adding, updating and publishing tags

You’ll need to add tags to your new container. For web, replacing any tags you removed from the site in the previous step. For example, if you deleted an AdWords Conversion Tracking tag, add it back in Google Tag Manager. Once a container has been created and the container tag has been added to the site, you’re ready to add and update all tags from the Tags page.

  1. In Google Tag Manager, select an account. The default workspace for the selected container appears.
  2. Click Tags in the left nav bar. The Tags List page appears.
    • To add a tag: Click New. Select the tag type (for example, Google Analytics) and specify triggers for when the tag should fire. Read Tags to learn more.
    • To edit a tag: (for example, update the triggers for when the tag should fire) Click the tag in the list. Make changes on the Edit Tag page. Read Tags to learn more.
    • To delete a tag: Click the tag in the list. On the Edit Tag page, click the More Actions menu (three dots) in the upper right corner of the screen and choose Delete.
  3. Preview. Previewing gives you an opportunity to perform quality assurance (QA) on your site or app. You can make sure everything looks and behaves as you expect. On the web you can use the debugging option to see which tags fire as you browse and interact with the site.
    • From any web page in a workspace with unpublished changes, click the Publish button in the upper right corner of the screen, then click Preview and Debug. Read Previewing and Debugging to learn more.
    • See the developer site to learn how to preview and debug on Android and iOS.
  4. Publish the changes live. When you are ready to make your changes live on your website or app, click the Publish button in the upper right corner of the screen, then click Publish Now.
Was this article helpful?