Creating and configuring your first container in Google Tag Manager (GTM) is essential for implementing tracking and analytics on your website or mobile app. Here’s a step-by-step guide:
Table of Contents
Toggle1. Sign in to Google Tag Manager:
- Navigate to the Google Tag Manager website (tagmanager.google.com) and sign in with your Google account. If you don’t have one, you’ll need to create it.
2. Create a New Account:
- Once logged in, you’ll be directed to the Google Tag Manager dashboard. If you haven’t created an account yet, click on the “Create Account” button. Enter an Account Name, which typically represents your company or organization.
3. Set up a Container:
- After creating the account, you’ll be prompted to set up a container. A container is a place where you’ll manage all your tags for a website or mobile app. Click on “Create Container” and fill in the following details:
- Container Name: Give your container a descriptive name, such as the name of your website or app.
- Container Setup: Select the type of platform you’re setting up tracking for (Web, iOS, or Android).
- Where to Use Container: Specify where you’ll use this container. For most cases, select “Web.”
Once you’ve entered the details, click on the “Create” button.
4. Accept Terms of Service:
- Before proceeding, you’ll need to review and accept Google Tag Manager’s Terms of Service. Take a moment to read through the terms, then check the box to indicate your acceptance.
5. Install Container Snippet:
After accepting the Terms of Service, you’ll be provided with the GTM snippet. This snippet of code needs to be added to every page of your website or app that you want to track.
- Copy the Snippet: Click on the snippet box to copy the entire snippet to your clipboard.
- Paste the Snippet: Paste the snippet just after the opening
<body>
tag on every page of your website.
6. Verify Installation:
- Once you’ve installed the GTM snippet on your website, you should verify that it’s working correctly. You can do this using Google Tag Assistant or by enabling Preview mode within Google Tag Manager.
7. Add Tags, Triggers, and Variables:
- With your container set up and installed, you can start adding tags, triggers, and variables to track various actions and events on your website or app. Common tags include Google Analytics, Facebook Pixel, and AdWords Conversion Tracking. Triggers define when tags should fire, and variables hold dynamic values used by tags and triggers.
8. Preview and Test:
- Before publishing your changes, it’s crucial to preview and test your container to ensure that your tags are firing correctly based on your triggers and variables.
9. Publish Container:
- Once you’re satisfied with your configurations and have tested thoroughly, you can publish your container to make the changes live on your website or app. Click on the “Submit” button in the top right corner of the GTM interface, enter a version name and description for your changes, then click “Publish.”
Congratulations! You’ve successfully created and configured your first container in Google Tag Manager, and you’re ready to start tracking events on your website or app.