Set up and install Google Tag Manager (GTM)

Installing a Google Tag Manager on your client's site is easy and can afford many shortcuts down the line. Below are the steps that will get this placed.

Install Google Tag Manager to configure and deploy tags, including tags from Google Ads, Google Analytics, Floodlight, and 3rd parties. At a high level, the steps are:

  1. Create a new account and container, or add a container to an existing account.

  2. Install the container in your website or mobile app.

    1. For web and AMP pages: Add the container snippet as instructed by Tag Manager, and remove any existing tags.

    2. For mobile apps: Use the Firebase SDK for Android or iOS.

  3. Add and publish your tags.

A Tag Manager account represents the topmost level of organization. Typically, only one account is needed per company. A Tag Manager account contains one or more containers, and there are specific container types that may be used for websites, AMP pages, Android apps, and iOS apps.

 

Create a new account and container

A new container is created by default when you create a new account.

  1. In 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. Enter a descriptive container name and select the type of content: Web, AMP, Android, or iOS. If setting up a mobile container, select whether you're using the Firebase SDK or one of the legacy SDKs.

  4. Click Create.

  5. Review the Terms of Service and click Yes if you agree to those terms.

 

Add a new container to an existing account

  1. In Tag Manager, click Accounts next to the relevant account name.

  2. Choose Create Container.

  3. Enter a descriptive container name and select the type of content: Web, AMP, Android, or iOS. If setting up a mobile container, select whether you're using the Firebase SDK or one of the legacy SDKs.

  4. Click Create.

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

You can install your code snippets now, or click OK to clear this dialog. You can always set up your container first and install the container snippet or SDK later.

Install the container

If you are not experienced with code or do not have access to your website or mobile app code, you may need to enlist the assistance of a developer for this step. Developers can learn more at the Tag Manager Developer Quick Start Guide.

  1. In Tag Manager, click Workspace.

  2. Near the top of the window, find your container ID, formatted as "GTM-XXXXXX".

  3. Click your container ID to launch the Install Tag Manager box.

  4. Copy and paste the code snippets into your website as instructed in the Install Tag Manager box, or download and install the appropriate mobile SDK. See below for tips on web, AMP, and mobile installation.

Web pages

AMP pages

Mobile apps

Verify or troubleshoot your installation with Tag Manager's Preview Mode and the Tag Assistant Chrome extension.

Add, update and publish tags

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

  1. Click Tags from the navigation menu.

    • To add a tag: Click New. Select the tag type 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 the menu in the upper right corner of the screen and choose Delete.

  2. Preview mode gives you an opportunity to inspect your Tag Manager configuration on your site or app to make sure everything behaves as expected. On the web, you can use the debug 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 Preview. Learn more.

    • For mobile apps, read the developer documentation for Android and iOS.

  3. When you're ready, click Submit in the upper-right corner of the screen to begin publishing your changes. Add details such as a Version Name and Version description, then click Publish.

 

Most Tag Manager implementations start with a Google Analytics page view tag deployment. Get step by step instructions for how to deploy a Google Analytics tag.