Skip to main content

Learning the Basics of Google Tag Manager

December 2019

Since it’s release, Google Tag Manager (GTM) has been one of the most helpful tools for setting up your website tracking and analytics. As a tag management system, Google Tag Manager lets you manage and deploy snippets of code and tracking pixels without having to edit your websites code.

This guide is meant for people who have little to no experience with Google Tag Manager. We will cover all the main areas of the GTM tool as well as how to set up basic Google Analytics tracking for your website.

You can login by going to https://tagmanager.google.com/. Once logged in, you are ready to create an account.

Creating an Account

 

First, click on “Create Account” and then fill out the account information.

 

 

At Element5, we setup the Account Name as the name of the business and the Container name as the URL of the site.

Once you create the account, you will be shown instructions on how to install the Google Tag Manager code on your website. Follow these instructions and then you will be ready to start exploring GTM.

 

 

Workspace

 

The workspace is the area of GTM where you set up all of your tracking. You can have multiple workspaces (up to 3), but for most applications you can get away with using the default workspace. Each workspace has a version history to track changes over time.

When working within the workspace, you will be mainly working with tags, triggers and variables.

Variables

 

Variables give Google more information to help with setting up tracking. Google Tag Manager has two types of variables, built-in and user-defined. The built-in variables include things like page URL, click text, form ID, and scroll depth threshold. User-defined variables can be things like custom JavaScript, constants, and Google Analytics settings. The most common user-defined variable is the Google Analytics tracking ID.

Tags

 

Tags are snippets of JavaScript or tracking pixels that tell Google what to do. Some common tags are Google Analytics tracking code, Google Ads remarketing and conversion tracking code, heatmap tracking code like Hotjar, and Facebook pixels.

Triggers

Triggers tell Google when to initiate or fire a tag and can be assigned to multiple tags. Some common triggers are on page view, link click, form submission, and scroll depth. For each trigger type, you can also specify where the trigger fires on all or some. For example, if your trigger type is page view, you can set it to fire on all page views or some page views.

 

 

If you set the trigger to fire on some page views, then you would need to set the conditions. Conditions tell Google when to fire a trigger based on variables. For example, you could set a trigger to only fire when the click ID contains the word home.

Setting Up Basic Google Analytics Tracking

 

The first thing you are going to want to do is set up a variable for your Tracking ID. To do this, go to Variables and create a new user-defined variable. Name your variable something unique. We suggest something like “GA Tracking ID”.

For the variable type, select Google Analytics Settings and then enter your tracking ID. Cookie domain can be left on auto. Under the more settings dropdown, you can select any additional settings you need for your website tracking. We suggest enabling display advertising features by default.

 

 

Next, go to Tags and create a new tag. Name your tag something unique. We suggest something like “Google Analytics Tag”. For the tag type, select Google Analytics: Universal Analytics and for the track type select page view. Under Google Analytics Settings, select your custom variable for the tracking ID.

Under Triggering, click “Choose a trigger to make this tag fire…”. For this tag you can select the pre-made All Pages trigger so that the GA code fires on all pages. Don’t forget to click the blue save button in the upper right.

We suggest previewing your changes live on your site to confirm the tag is firing before submitting and publishing everything. Continue reading to learn how to preview your tags.

 

 

When you are ready to push your changes live, click on the blue Submit button in the upper right and then click on Publish. You can add a container version name and description and then click on Continue. That’s it, you did it!

Preview Mode

 

Preview mode lets you go to your website and see all of the tags that have been fired. You can also see what interactions fired the tags such as clicks on buttons and links.

 

 

Don’t forget to leave preview mode in GTM when you are done. Google lets you know when preview mode is enabled by showing an orange box toward the top of the workspace.

Versions

 

The Versions tab lets you view all of the past versions of your container. You can publish, preview, delete, and export old container versions.

Admin

 

The Admin tab lets you edit account and container settings as well as manage users.

Recap

Once you are familiar with the basics of Google Tag Manager then you can start learning more advanced ways of tracking. Simo Ahava’s blog is a great resource for learning advanced techniques as well as other common ways of tracking in GTM. Another great resource is Google’s Tag Manager Help Center.

If you ever have any questions regarding Google Tag Manager, just shoot us an email or contact us!

Written by

More from Me

Google Search Console

Exploring the New Google Search Console

By Element5 Digital

Charts and Graphs that look like Google Analytics Dashboard

Learning the Basics of Google Analytics

By Element5 Digital

bert

What is Google BERT and How Will it Affect Your Site

By Element5 Digital

Need our help on a new project?

Shoot us a message. We'd love to hear from you.

get a quote