How to create and configure your first container in Google Tag Manager

Author:

Creating and configuring your first container in Google Tag Manager (GTM) is an essential step to managing your website’s tracking tags effectively. Below is a step-by-step guide to help you set up your first container:

Step 1: Log into Google Tag Manager

  1. Access GTM: Go to the Google Tag Manager website.
  2. Sign In: Use your Google account credentials to sign in.

Step 2: Create a New Account (if necessary)

If you haven’t already created an account, you’ll need to do that first.

  1. Click on “Create Account”.
  2. Enter Account Name: Typically your business or website name.
  3. Select Country: Choose your country from the dropdown.
  4. Container Setup:
    • Enter Container Name: This usually reflects your website or app name.
    • Where to Use Container: Select the platform for your container:
      • Web (for websites)
      • iOS (for mobile apps)
      • Android (for mobile apps)
      • AMP (for Accelerated Mobile Pages)
  5. Click “Create” to proceed.

Step 3: Accept the Terms of Service

  1. Read the Terms: Review the Google Tag Manager Terms of Service.
  2. Check the box to accept the terms.
  3. Click “Yes” to confirm.

Step 4: Install the GTM Snippet on Your Website

After creating your container, you’ll receive two snippets of code to add to your website.

  1. Copy the Snippets: The first snippet goes in the <head> section, and the second snippet should be placed immediately after the opening <body> tag.
  2. Access Your Website’s Code:
    • If you’re using a CMS like WordPress, you can use plugins (like Insert Headers and Footers) or edit your theme files directly.
  3. Paste the Code:
    • Insert the first snippet in the <head> section and the second snippet after the opening <body> tag of your website’s HTML.
  4. Save Your Changes.

Step 5: Verify Installation

To ensure that Google Tag Manager is correctly set up:

  1. Return to GTM: Go back to the Google Tag Manager interface.
  2. Click on “Preview”: This will enable the debug mode.
  3. Open Your Website: In a new tab, visit your website. You should see the GTM Debug console at the bottom of the page, indicating that GTM is working properly.

Step 6: Create Your First Tag

Once your container is created and GTM is verified, you can create your first tag.

  1. In GTM, click on “Tags” in the left sidebar.
  2. Click on “New”: This opens a new tag configuration window.
  3. Click on “Tag Configuration”: Choose the type of tag you want to create. Common choices include:
    • Google Analytics: To track pageviews and user interactions.
    • AdWords Conversion Tracking: To track conversions from your Google Ads campaigns.
    • Custom HTML Tag: For third-party scripts.
  4. Configure the Tag:
    • For Google Analytics, select “Universal Analytics”, and fill in the necessary details, including your tracking ID and tag type (e.g., Page View).
    • Follow prompts based on the tag type you selected.

Step 7: Set Up a Trigger

Triggers define when your tags should fire.

  1. Click on “Triggering”: After configuring your tag.
  2. Select a Trigger Type: Common options include:
    • All Pages: Fires the tag on every page.
    • Click Triggers: Fires the tag when specific elements are clicked.
  3. Choose or Create a Trigger:
    • For a simple setup, select “All Pages” to track page views.
    • If you want to create a custom trigger, click on “New” and configure the trigger based on your criteria.
  4. Save your Trigger.

Step 8: Save Your Tag

  1. After configuring your tag and trigger, click “Save” to save your new tag.

Step 9: Publish Your Container

To make your tags live, you must publish your container:

  1. Click on the “Submit” button in the upper right corner.
  2. Add a Version Name and Description: This is optional but helpful for tracking changes.
  3. Click “Publish” to finalize.

Step 10: Test Your Tags

After publishing, it’s crucial to ensure everything is working correctly:

  1. Use the Preview Mode: Click on “Preview” in the GTM interface again.
  2. Visit Your Website: Navigate your website while in preview mode. The GTM debug console should show which tags are firing based on the triggers you set up.
  3. Check Google Analytics (if applicable): Go to your Google Analytics account to see if data is being recorded.

Conclusion

Creating and configuring your first container in Google Tag Manager is a valuable skill that allows you to manage your website’s tags efficiently. By following these steps, you can effectively set up GTM, create tags, and publish them, paving the way for enhanced tracking and analytics capabilities. Regularly review and update your tags to ensure they align with your evolving business goals and marketing strategies.