NewCity

Google Tag Manager 101: The Basics

An illustration of a person selecting from many analytics-related options
You’re probably hearing a lot about Google Tag Manager, but do you understand exactly what it is and why to use it? If not, read on!

What is it?

Google Tag Manager (GTM) is a free tool for managing your tracking tags, which are the little bits of code you place on your site to record usage data.

You can implement almost any kind of tracking tag or pixel via GTM, including Google Analytics pageview and event tags, Adwords conversion tags, remarketing tags, onsite surveys tags, and many, many more.

Why use it?

Basically, because GTM is really flexible and makes tracking your site much easier:

  1. It allows you to easily specify which tags should record data on which pages. Say you only want to record a conversion in Adwords when someone views the Thank You page of your inquiry form. You can do this quite easily in GTM by attaching a particular trigger to the Adwords Conversion tag so that it only fires on that page.
  2. It comes with a lot of built-in tag templates that reduce the amount of custom javascript code you have to deal with and make it a cinch to set up common tags. Many of the basic tag types you’ll need (GA pageviews and events, adwords conversions, etc.) have built-in templates. And for those that don’t have templates, there is a custom HTML tag type that allows you to add your own tracking code snippet.
  3. It has its own built-in debugging mode that let’s you test your tags before you make them live. This is valuable not only because it allows you to minimize the risk of breaking something on your site, but also because it allows you to minimize the risk of contaminating your data. You can test a tag and, before making it live, see what the data it produces looks like.
  4. It comes with it’s own versioning system that allows you to see when changes were made to your tracking tags, and if necessary, roll back to previous versions. Being able to reverse engineer where data came from is an essential step in analyzing web analytics data and dealing with shady data.

When the out-of-the-box GA tracking code snippet is the only tracking tag on your site, then using GTM isn’t particularly valuable. But if you’re dealing with a complex setup involving multiple domains and/or subdomains, or if you’re going to be installing multiple tags (e.g., GA tags for tracking file downloads, outbound links, or form submits; ad vendor pixels for tracking conversions; Crazy Egg tags for creating heat maps), GTM is a must have.

How does it work?

You place a single snippet of GTM JavaScript code on your site that corresponds to your GTM “container.” Then you use the GTM user interface to populate the container with various tracking tags. Once the GTM JavaScript code has been placed on your site and all of your tracking tags are set up in the GTM container, you can then “publish” the container to begin injecting the tracking tags defined in your GTM container into the pages on your site via the GTM JavaScript code.

Once you have migrated all of your tracking tags to GTM there is usually no need to have any other tracking code in the template files of your site.

The Bottom Line

Measurement of digital properties is essential to good digital practice. Therefore, it’s imperative that the foundation of that measurement — your tracking setup — is rock solid. And there may be no other tool that’s as crucial for solidifying that foundation as Google Tag Manager.

NewCity logo