Google Tag Manager (GTM) is a free tool that enables you to install, store, and manage marketing tags without modifying website code.
Marketing tags are small snippets of code that track user actions and collect information like behavior data, remarketing data, ecommerce. Adding Tags will reduce the performance of the website and you need a developer for the same. You can use Tag Manager to create Analytics, Google Ads, or any third-party tags, and specify when they should fire. This simplifies and speeds up the process of tag deployment, and can really streamline tag loading for faster website performance.
The most common example of a marketing tag is the Google tag used to install Google Analytics and other Google products.
Other common examples include Google Analytics event codes, Google Ads conversion scripts, Meta Pixel code, and remarketing tags.
You need to place tags like these in your website code for Google Analytics and other platforms to function and collect data.
But with every addition and code change, you risk forgetting about, losing, or breaking tags (or other website elements).
GTM mitigates these issues by allowing you to install, manage, and deploy marketing tags from within its software instead of in your website code.
And the software injects code snippets and marketing tags into your website code only when necessary.
So you won’t accidentally break your website by testing something. A site can have so many tags, that it becomes cluttered and difficult to manage
What Is Google Tag Manager Used For?
Tag Manager allows you to to track almost any kind of event or user behavior you can think of.
Here are some examples of commonly tracked events:
- Link clicks
- Button clicks
- Form submissions
- Conversions
- Call to action (CTA) performance
- Custom events
How Does Google Tag Manager Work?
Google Tag Manager works by using a single JavaScript code snippet that you add to your site as a container for all the tags you want to manage.
When a user triggers a tag (e.g., by clicking a link or loading a page), GTM retrieves it and activates it into your website code.
Then, GTM executes the tag.
In other words, GTM only activates and executes a tag when a user triggers one. This reduces the overall amount of code on a website and minimizes the risk of implementation errors.
Tags work with other GTM components called triggers and variables to determine when to execute code snippets.
Let’s discuss what tags, triggers, and variables are. And how they work.
What Are Tags?
Tags are snippets of code analytics, marketing, and support platforms used to integrate with sites and apps.
Google Analytics, for instance, uses tags to collect data on website visitors.
In this case, the Google tag lets you send data from your site to a connected Google Analytics property.
Through GTM, you can create, manage, and publish tags without having to code them yourself.
Examples of Tags
The following are examples of commonly used tags. These are tools and platforms often installed with GTM:
- Google Analytics
- Google Ads Conversion Tracking
- Quora
- PageImprove
- Crazy Egg
- Hotjar
- ImpactHero
- Pinterest Tag
- LinkedIn Insight
- Twitter Universal Web Tag
- Facebook/Meta Pixel
- SplitSignal
- Appcues
- HubSpot
- Intercom
- Mixpanel
- Salesforce
- Custom events and tracking
Note: Facebook domain verification will be added through Meta tag only.
What Are Triggers?
Triggers are instructions for when tags should fire.
Page views, form submissions, and link clicks are common examples of triggers. When a user views a page or clicks a link, the associated tag will fire.
You need to assign a trigger to every tag so the Tag Manager knows under what circumstances to fire the tag.
Analytics platforms like Google Analytics typically use page views as a trigger. You want analytics data from every page a user visits.
Alternatively, you might only want a conversion tracking tag to fire when a user places an item in their cart. Or perhaps when they complete the checkout process.
When each tag’s specified event occurs, its trigger tells the tag to fire.
Otherwise, that tag will not fire. And GTM won’t execute the code snippet.
You can also add filters to triggers to specify when you want tags to fire.
For example, you may only want your support chat to fire on pages in the checkout funnel.
In this case, you could add a filter that tells the tag to only fire on page views of pages with “/checkout/” in the URL.
You can assign multiple triggers to a single tag.
Examples of Triggers
Here are some of the most commonly used triggers:
- Page views
- Link clicks
- Button clicks
- Form submissions
- Time spent on page
- Custom event
What Are Variables?
Variables are additional pieces of information that GTM may need to fire a tag or trigger.
They help define precisely what the tag or trigger is supposed to do.
For example, “Constant” and “Google Analytics Settings” are common variables.
They are both typically used to define Google Analytics account IDs (i.e., “Tracking ID” in Universal Analytics and “Measurement ID” in GA4).
Every time you create a Google Analytics tag, you need to enter your tracking or measurement ID.
This can get tedious, as most of us don’t memorize these IDs.
Instead, you can create a variable that simply stores your ID.
Then, whenever you create a new tag that requires this information, you simply attach the variable you created.
Examples of Variables
The following are some of the most common variables:
- Constant
- Google Analytics Settings
- Click URL
- Click ID
- Click Class
- Page URL
- Form ID
- Scroll depth threshold
Benefits of Google Tag Manager
While Tag Manager requires some technical knowledge, it saves marketers tons of time and resources.
And it’s free.
Here are some benefits:
- Reduced reliance on developers: Quickly and simply add and manage marketing tags without developer assistance
- Testing and debugging: Preview, test, and debug changes before pushing them to a live site. This feature helps prevent errors and reduces the need for testing on a live or staging site.
- User permission control: Only authorized people can make or approve changes to your marketing setup
- Versions: GTM creates and logs a new version of the code whenever you publish changes. This allows you to view past and present changes and revert to previous versions if necessary.
- Workspaces: GTM enables multiple workspaces for team members to work simultaneously without overwriting each other’s progress
- Easy configuration of many popular tools: Easily add tools and tracking tags to your website code using code snippets or existing templates (e.g., for Google Analytics, Pinterest, Google Ads, etc.) from the Community Template Gallery
- Tag storage and management: Google Tag Manager consolidates marketing tags and tracking codes in one place and injects them into website code as needed. Which allows you to add, remove, and update tools and tracking codes with fewer errors.
How to Set Up Google Tag Manager
To set up Google Tag Manager, log in to your Google account and go to Tag Manager.
Click “Create Account” to create an account for your business or organization.
Enter an “Account Name” and select your country. Google recommends that each business create only one account—whether you have one website or multiple. Your company name can serve as your account name.
Next, enter a “Container name.”
Your container is the piece of code you will add to your website to make Google Tag Manager work. You will typically use one container per website. So your container name can be your website name or URL.
Then, select your “Target platform.” For websites, choose “Web.”
Click “Create” to make your Tag Manager account and your first container.
Next, you’ll see two pop-ups.
The first is the Google terms of service. Agree to the terms by checking the box at the bottom of the page. And clicking “Yes” to accept at the top right corner of your screen.
The second pop-up displays the code snippets you need to add to your site to install GTM.
Note: If you’re not comfortable modifying your website code, ask a developer for assistance.
The first code snippet uses JavaScript to extract information. Place that snippet as high in the <head> section of your website pages as possible.
The second snippet is an HTML iframe. Place that code immediately after the opening <body> tag on your webpages.
Like this:
(The HTML iframe element ensures that GTM still works when users disable JavaScript in their browsers.)
Once you’ve set up your account and properly installed the two code snippets, you’re ready to start using Google Tag Manager.
How to Use Google Tag Manager
To demonstrate how to use Google Tag Manager, we’ll walk you through how to connect a Google Analytics 4 property to your site.
To begin, log in to your Google Tag Manager account.
Click “New Tag” or “Add a new tag” to create a new tag.
Add a name for your tag. We suggest something like “GA4 Configuration.”
Next, click on “Tag Configuration.”
And select “Google Analytics: GA4 Configuration” from the list.
Enter the measurement ID for your GA4 property. Alternatively, you can create a variable to house your measurement ID for future use.
Click the “Triggering” box.
And select “All Pages” from the list that pops up.
Then click “Save.”
Go back to your workspace overview page and click “Preview” to test your new changes.
Enter your website’s URL in the next screen and click “Connect” to open your site in a new window and begin testing and debugging.
Once you’re connected, your site should open in a new pop-up. With the Tag Assistant in the lower right corner of your window.
Keep that window open and return to the preview page. The preview page should say, “Connected!”
After you hit “Continue,” start debugging your tags in the preview window.
You should see your newly created GA4 Configuration tag firing on each page as you navigate your website.
This means your tag implementation was successful.
When you’re done debugging, close the newly opened windows and go back to your page overview. And click “Submit” to submit your changes.
Be sure to give your changes a descriptive “Version Name” and “Version Description.”
Lastly, click “Publish” to push your changes to your live website and enable GA4.
This will publish a new version of your container to your website.
You should now see hits registering in the “Realtime” report of your GA4 property as you and other users navigate the website.
Pro tip: We strongly recommend always using the “Preview” function to test and debug your tags before you publish them.
- Video Reference
- Induction Video Link
- Setup Video Link
- Components
- How to set page view trigger as a tag and it working:
- Click Event
- How to track an event in GA
- How to Set Up Google Tag Manager in Meritto
- How to set-up Google Tag Manager in Meritto
Comments
0 comments
Please sign in to leave a comment.