What is Google Tag Manager? How does it work? Why do you need it?
Popularly known as GMT or Tag Manager, Google Tag Manager was added to the search titan’s collection in 2012.
Most SEO marketers tend to confuse GMT with Google Analytics (GA), a free analytics service offered by the search engine to track and report website traffic. Today, online marketing thrives on data, and GA offers you plenty of data about of web property and visitors.
For this data to be collected, you need to use tags on your web properties. Tags are simply snippets of JavaScript codes. You need to configure them to your web properties to capture your visitors, their actions, and activities.
So, if you are managing different properties, using GMT can make your work easier. It is vitally important that you learn the ins and outs of how to use Google Tag Manager.
Let’s get right into it.
What Is Google Tag Manager?
In simple terms, GMT is a free tag management tool provided by Google to deploy and manage tags and code snippets on websites and mobile apps.
The purpose of this tool is to reduce errors whenever webmasters are managing their tags. Typically, it offers a web-based user interface you can use to configure all tags you have added to your apps or website without changing or adding any other code.
In this case, if you’re a layman in coding, you don’t need to worry about writing or editing any code. Plus, there’s no need to hire a developer to help you change your codes. You only need one Tag Manager account to manage and administer all your tags.
GMT offers a container to add to your site. A container is basically a collection of triggers, tags, variables and other configurations installed on your app or site. It replaces all the manually-coded tags from Google Analytics, Google Adwords, Floodlight and other third-party services.
Components of GMT
For practical use of Google Tag Manager, you need to understand its features and components before deploying it. As noted before, only one account per organization is necessary.
Below are the various components you will encounter as you explore your account:
1. Container Tag
As noted before, the container tag is the GMT code that you configure for your site. It’s usually a collection of variables, triggers, and tags for the tools you’re using on your website.
This tag usually has two parts. The first part is usually placed in the head section, and the second part is placed after the opening tag on your website. You can see these two codes by logging into your account and clicking the “Admin” tab.
Then click “Install Google Tag Manager,” and you’ll see the codes.
2. Container ID
In the code, you’ll notice a section that reads “GTM-XXXX,” and this is what’s known as container ID. Typically, this is a unique identifier for your container tag, and no two containers can have the same ID.
You’ll also see another part that reads “gtm.js” and this the container library that the container tag uses.
3. Tag Templates
A tag template makes it easy for you to publish tracking codes and avoid errors. You can find models for Adwords, Analytics, and Doubleclick in your account. Apart from these options, GTM also offers templates for supported and certified vendors.
If you want to use any template on your site, simply select it, provide the necessary details, and Google Tag Manager will automatically generate the code for you. Keep in mind that GTM will also fire the tag using the triggers you gave.
4. Variables
Variables are used in tags and triggers, and they are usually name-values that come in pairs. A variable is usually called from within another variable, trigger, or tag. For example, you can have a variable named “url” that is defined to be the current page URL.
When used in triggers, variables define filters that specify when a particular action should be executed. They’re also used in tags to capture dynamic values. Every container that you create in your Google Tag Manager account usually comes with a set of predefined variables.
5. Triggers
A trigger is simply a condition that can either be false or true during the runtime of a tag. It works by comparing your predefined variable to the value you configured when defining the trigger. There are two types of triggers: Firing and blocking triggers.
In your GTM account, you set up triggers with tags to specify when they should fire. For example, you can set a trigger as “All Pages.” In this case, your tag fires whenever any page on your website is loaded.
6. Data Layers
A data layer is a JavaScript object that stores and sends your site’s data to Tag Manager. This data is later transferred to all those tools with tags, including Google Analytics. It’s automatically created once you add the GTM container’s JavaScript Snippet to the source code of your website.
GTM tags use the information stored in the data layer to gather certain data. They also use the information to evaluate advanced firing rules. You can use data layers to retrieve run-time information.
Getting Started with GTM
Now that you understand what Google Tag manager is, it helps to learn how to set it up.
First, you need to go to tagmanager.google.com to create an account or use your existing account. Under “Setup Account,” enter the name for your account and then hit “Continue.”
This will direct you to set up your container. Here, you’ll use your domain name as the container name. You’ll also need to choose where to use the container, including web, iOS, Android, and AMP. Generally, you’ll need one container per domain.
You can create several containers for different domains using one main GTM account. Also, if your site has a subdomain, you can set up a separate container for it. If you’re using an agency to manage your website, create your own GTM account and add the agency as a user.
Install Tag Manager
After creating the container, you’ll need to accept the terms of service of GTM. It’s only after this that you’ll get your container code. As noted before, the code has two separate parts for the head and opening tag sections.
You can then copy the codes and add them to your website as directed on your GTM account. If you’re using WordPress, there are plugins, such as DuracellTomi’s Google Tag Manager for WordPress, you can use to install the code. After adding the code, you’ll ready to create tags.
Creating Tags
Before creating tags, take the time to determine which tags you want. There is no limit to the number of tags you can have. However, it’s advisable to keep them at a minimum to ensure the best performance.
If you’re migrating tags from another tag manager, take the time to clean things up first. Remove tags for things you’re no longer monitoring. Also, get rid of tags for services you’re not using anymore.
When you’re ready, select the container you created to access your GTM dashboard. Select “Add a New Tag” to open a window for setting up and configuring your tags. This will allow you to choose from over 50 tag types depending on what you want.
Keep in mind that your site or app may use different tags. As such, proper naming of tags is vital during the setup process. Google recommends the “Tag Type – Detail – Location” naming convention when creating your tags. For example, the tag for your Contact US page can be “GA – Form Submission – Contact Us.”
Click “Tag Configuration” to access a list of tag templates in Google Tag Manager. You’ll find some of the commonly used tags here. Select the one you want and enter all the information requested. If the template list doesn’t have something that you want, just click “Custom HTML” to create a new tag.
A Tag Setup Example
Let’s use a tag for Google Analytics as an example. In this case, you will pick Universal Analytics from the template list. When configuring it, select “Page View” from the “Track Type” drop-down menu. You can then enter the variable using your GA account information or create a new one.
If you want to create a firing schedule or change the firing sequence, select the “Advanced Settings” option. You can then exit the configuration window by clicking on the outside.
Next, you’ll need to create a trigger. Just below the “Tag Configuration” box, you’ll see the “Triggering” box. For your GA’s trigger, you’ll need to select “Page View” from the provided list of trigger types. You can pick a previously created trigger, or you can create a new one.
If you want your tag to fire on one page, select “Some Page Views.” Then, specify that the page URL needs to be equal to the page that you’ve entered. You can also create multiple triggers if you want. Also, if you don’t want specific triggers for your tag, you can simply remove them.
Preview, Debug, and Publish
Before publishing any tag, be sure to use the “Preview & Debug” mode to ensure they’re working okay.
At the upper right corner of your Google Tag Manager dashboard, click “Preview” to access the “Preview & Debug” mode. Then, open the site you’re tagging. You should be able to see the debug panel at the bottom of the screen. Try reloading the page if you can’t see it.
The panel will display all the information for your data layer, tags, and triggers. You can also see a timeline of events on the left side of the panel. This includes DOM Ready, Page View, and Window Loaded.
Try clicking on one of those events. This will show you all the tags that are set to fire when the event occurs. Click on any of the tags to view its triggers and properties. You see if there is any problem and fix it. Also, there is the “Share Preview” option, which you can use if you’re working as a team.
You can also install the Google Tag Assistant chrome extension to ensure tags are okay. The extension uses colors to indicate the state of the tags. For example, green means everything is okay, blue implies you can make improvements, and red shows something is wrong.
Once you’re sure everything is firing correctly, you can publish your tags.
Get Rid of Duplicate Code
Most people are already using Google Analytics code on their sites. So, it’s highly likely that you’re using it, too. If you want reliable organic search data, it helps to get rid of the code. In this case, you’ll only run Analytics through Google Tag Manager.
Here, the Google Tag Assistant extension can help you know if you’re using multiple GA codes. Also, check your traffic data to know everything is okay. It helps to monitor your traffic during the first few weeks after implementing GTM.
Why Use GTM
One of the biggest benefits of using Tag Manager is that you don’t need to rely on web developers. You can easily configure and implement the code without any expert help. This because there’s no editing of the source code.
If you’re using different tags on your site, it means you’ll need to implement all of them separately. Google Tag Manager gives you a central place to create, edit, manage, and publish all the tags. This is great for small businesses with limited access to technical support.
You can also use GTM for mobile apps and AMP sites. In the case of apps, Tag Manager allows to add and edit tags without issuing an updated version for your app.
Google Tag Manager – Final Thoughts
At this point, you know enough to start using GTM. This free tool allows marketers and webmasters to create, manage, and deploy tags with much ease. Of course, you’ll need time to learn how it works to use it effectively.
With Google Tag Manager, it will be convenient for you to monitor your traffic. You can implement tags for SEO tools you’re using. This way, you’ll have adequate data about your website and visitors. At FiveChannels, we help our clients take their digital marketing efforts to a whole new level.
If you need expert help in digital marketing, just reach out to us to get a free digital marketing review.
Owner and Chief Marketing Officer, Jason Hall, and his team specialize in creating brand awareness / traffic and lead generation / marketing funnel and conversion optimization, while utilizing the appropriate marketing channels available within your industry. With diverse clients throughout the world, Jason's team is well connected within many industries to assist with your marketing strategies. With no long term contracts and various levels of service, Jason's team will increase the quality of your online traffic, leads, and sales.
About the author...
Located in the heart of the Emerald Coast - Destin, FL, founder and Chief Marketing Officer, Jason Hall, and his team specialize in creating brand awareness / traffic and lead generation / marketing funnel and conversion optimization / and PR campaigns, while utilizing the appropriate marketing channels available within your industry.
With diverse clients throughout the world, Jason's team is well connected within many industries to assist with your marketing strategies. With no long term contracts and various levels of service, Jason's team will increase the quality of your online traffic, leads, and sales.