Last Updated on May 12, 2022

Tag Manager Overview

(In Google’s Words)

Google Tag Manager is a tag management system (TMS) that allows you to quickly and easily update measurement codes and related code fragments collectively known as tags on your website or mobile app. Once the small segment of Tag Manager code has been added to your project, you can safely and easily deploy analytics and measurement tag configurations from a web-based user interface.

When Tag Manager is installed, your website or app will be able to communicate with the Tag Manager servers. You can then use Tag Manager’s web-based user interface to set up tags, establish triggers that cause your tag to fire when certain events occur, and create variables that can be used to simplify and automate your tag configurations.

A collection of tags, triggers, variables, and related configurations installed on a given website or mobile app is called a container. A Tag Manager container can replace all other manually-coded tags on a site or app, including tags from Google AdsGoogle AnalyticsFloodlight, and 3rd party tags.

Using Google Tag Manager to Simplify Tag Implementation

(In Sebo’s Words)

Google Tag Manager was created in order to make the process of implementing tracking on various platforms more simple. Before Tag Manager, a webmaster or agency would have to have access to the backend of the website, go into the header or footer code, and implement each tag separately. This leads to multiple people needing to sign into the backend of the website constantly, which is a security issue, and messy backend code. With Tag Manager, these two issues are resolved.

By implementing Tag Manager once, a user can then implement any other tracking code through Google Tag Manager without having to sign into the backend of the website. This resolves the issue of security and messy code. Following is an image of the GTM (Google Tag Manager) code that is implemented in the backend of the site. With GTM it’s the only tracking code that should need to be implemented.

If a website has a link to another website we can’t track those clicks because we won’t have our tracking code on the 3rd party website.  The same goes for 3rd party embedded elements on the website such as YouTube videos.  Google Tag Manager can be used to create events for tracking important clicks to other websites or for tracking if people are watching the videos on your site.  There are several other uses for Google Tag Manger but these are some of the basics.

GTM User Interface

Tags, Triggers, & Variables

Variables, triggers, and tags are the ways we utilize GTM. Using these we can track video clicks, track phone calls, and implement Analytics.

Tags and Triggers

A tag is a snippet of code that executes on a page. Tags can serve a variety of uses, but most of the tags used in Google Tag Manager are designed to send information from your site to a third party. Examples include the Google Analytics tag and the AdWords Conversion Tracking tag, which send information about activity on your site to Google.

If you don’t use a tag management solution such as Google Tag Manager, you add the code for each of your tags directly to the source code of your site. With Google Tag Manager, you can instead control all of your tags conveniently from a web user interface.

Tags typically execute, or fire, when the page loads, or in response to some interaction on the page. In Google Tag Manager, you define triggers with tags to specify when they should fire. An example of a trigger is the predefined “All pages”, which as the name implies may be used to set your tag to fire on any page on your site as it is loaded.

Triggers and Variables

A trigger is a condition that evaluates to either true or false at runtime. It does this by comparing the value in a variable with the value that you specified when you defined the trigger.

A Tag Manager variable is a configured name-value pair for which the value is populated during runtime. Tag Manager has many built-in variables, and you may configure custom variables as well.

For example, the predefined variable “url” always contains the URL of the currently loaded page. If you want a tag to fire only on the page example.com/purchase/receipt.html, you would define a trigger that looks like this:

  • Event: Page View
  • Trigger Type: Page View
  • Fire On: Some Page Views
    • Fire the tag when these conditions are true:
      URL contains example.com/purchase/receipt.html

You can define variables to suit your needs, each containing some piece of information that needs to be available at runtime. You can then use these variables in trigger conditions, or to pass information to tags. For example, you might define a variable that contains the price of an item that the user is viewing. Or, you might define a variable to contain a constant value such as your Google Analytics account id string.  Following is an example of a trigger and the different variable that fire that trigger:

Event and Conversion Tracking

One of the main things we use GTM to track is events. Events refer to any action taken by a user on a website that isn’t a conversion. We also may call these micro conversions. “Micro” because unlike a “macro” conversion, they don’t directly add value to a website visit. Common events may be watching a video, clicking on a social page link, clicking a link to a contact us page, or any number of actions a visitor may take that makes them more likely to perform a macro conversion. Events only apply to Analytics tracking since Analytics is the only platform that directly tracks them.

Most of the time conversions are tracked by creating a destination goal within Analytics. When creating a destination goal, GTM is only necessary for implementing the Analytics tracking code. However, if there is an action on a site that should be tracked as a goal, but doesn’t work as a destination page, you will need to create an event goal. Simply stated, an event goal is an action that needs to be tracked as an event, but then is used to trigger a goal. For example, let’s say a client provides other websites with traffic through links. This client’s website’s purpose is to have visitors click on a link and leave to another website. We can’t track that as a destination goal because the destination is a separate domain. So, in order to track this as a goal, we create an event, then within Analytics, we create an Event Goal.