Quick Start Google Tag Manager Guide

So you want to start making data-driven marketing decisions, eh? Then you’d better start getting comfortable with Google Tag Manager. The following article is my best attempt at clearing up any possible confusion that might occur during your first experiences with Google Tag Manager (GTM). It’s certainly not an exhaustive list, so if you do have further questions after reading this, don’t hesitate to reach out to me. I’m always happy to help out.

Let’s get to it!

Installation

First things first, you’ll need to install GTM onto your website. It’s a pretty simple process, and it’s very likely your website’s CMS (content management system) will have an existing plug-and-play integration. 

If not, just know that you’ll need to install two snippets of code, once into <head> section and once into the <body> section of every page you want to track on your website. For most businesses I work with, that means installing GTM across your website. 

To find the install codes, simply navigate the Admin section of your GTM account and click on the Install Google Tag Manager line item.

Install Google Tag Manager

To confirm your installation was successful, you can use the Google Tag Assistant Legacy browser extension.

Configuring GTM for Form Submissions and Click Tracking

Disclaimer: You can track all sorts of website engagement with GTM, but for the sake of brevity I will be focusing two of the most common types of conversion - click tracking and form submission tracking.

Variables

To start, you’ll want navigate to the Workspace overview and skip past the Tags and Triggers sections respectively. Click through to the Variables section. Once there, you’ll see a handful of Built-In variables enabled already but we’re definitely going to want to add to those. Though it ultimately depends on what sort of information is available in your website’s code, my recommendation would be to ensure the following are enabled:

  • Click Element
  • Click Text
  • Click URL
  • Form Element
  • Form Text
  • Form URL
  • Page URL

Configuring Built-In GTM Variables

Scroll Depth Threshold and On-Screen Duration are also interesting to me, but not required for our purposes of Click and Form tracking.

Enabling Auto-Event Listeners

Once your required variables are enabled, we’ll need to create auto-event listeners for click tracking, link click tracking, and form click tracking. This will instruct GTM to listen to any and all of those 3 events potentially occurring on a website page, and then send that to the Data Layer. 

If you’re curious about the Data layer, you can access Google’s documentation here. But unless you’re curious, I wouldn’t recommend diving into it yet. You won’t really need to worry too much about it yet!

To set up auto-event listeners, you’ll need to navigate to the Triggers overview. Then, you’ll need to add 3 new triggers, one for each event respectively. Luckily, the process is identical for each event, so it shouldn’t take you long here.

To create your triggers, you’ll need to select your Trigger Configuration as one of “Click - All Elements”, “Click - Just Links”, or “User Engagement - Form Submission”. Leave each event as is - your 3 event listeners should all be set to “This trigger fires on All Forms” Give your trigger an appropriate name, save, and repeat for the remaining auto-event listeners.

Creating GTM Auto-Event Listeners

Using Preview Mode

Once your variables and your auto-event listener triggers are set up, enable Preview Mode to enter the debug console. This will let you review the underlying code activity that occurs when your website is being engaged with. Admittedly, this is where it gets busy so don’t be shy about reach out to ask me questions if you have them.

At this point, you will be able to identify unique snippets of code that occur only when certain high-value interactions take place (ie: conversion events). My recommendation here would be to play around a bit with your site while the debug tool is enabled. Most importantly, make sure to recreate some high-value engagements on your site whilst debugging. This could be clicking on high-intent links or filling out a contact form, among many other things.

Let’s assume one of those high value events is a form submission. Once you’ve submitted a test form, navigate back to the GTM debug overview, and select the corresponding event for the form submission. Each event in your debug session will have a corresponding list of variables.

You’ll want to identify a unique set of variables for your high-value event. Once you’ve identified those variables, you can exit debug mode and navigate back to the Triggers overview. Ideally, you will be able to set up conversion triggers that look something like this:

  1. Track all Form Submission events on Page URL = “yourdomain.ca/contact” with Click Text = “Submit

What this means is that GTM is now set up to record all form submissions on our sample contact page, as long as the text on the button to submit this form equals “submit”.

Creating Your Tags

Once your trigger is set up properly, you will need to associate this trigger with the appropriate tags. And you guessed it, we’ll need to navigate over to the Tags overview for this next step. Tag setup differs based on the tag and platforms in question. Most commonly, you’ll be setting up tags within the Google Marketing Platform, such as Google Analytics (Universal Analytics and/or GA4). 

Setting Up GTM Tags

That said, there are dozens of pre-built tags available to you out of the box, and countless others in the Community Template Gallery. You can also use the Custom HTML Tag to great effect - the Facebook Pixel is one ubiquitous tag type that utilizes the Custom HTML Tag interface. 

At this point, I would refer you to the appropriate documentation for completing tag setup for each platform. I’ve provided those links below:

  1. Universal Analytics (please note Universal Analytics is being shut down in July 2023)
  2. Google Analytics 4
  3. Google Ads

Finishing Up

Lastly, and most importantly, there are two things you must always do before finishing your work in GTM.

First, always make sure to use GTM preview post-setup to ensure your tags are all working properly. You can easily do this by entering preview mode and triggering your conversion events. If set up properly, you will see that the tags have fired inside the GTM debug console. If they haven’t fired, information will be provided as to why. Rectify the issue, and repeat this process.

Once you have confirmed that all tags are firing properly, publish your container! Without publishing your containers, all of your hard work will remain in draft and no tracking on your live site will take place.

In Closing

Please note that this is a simplified checklist meant to help new GTM users get their account up and running without issue. The more complicated the web interface you are trying to track, the more likely you will run into situations that require custom event coding and subsequent developer assistance. 

If you run into such a situation and have a developer on staff, I recommend referring them to this helpful guide that explains the ins and outs of creating custom events and accessing the data layer.

If you don’t have a developer on-hand, or if you have any questions about GTM or our workshops that specialize in GTM, don’t hesitate to send us a message. We’re always happy to have a conversation about enabling data-driven decision making!

Written by Dylan Hergott

More stories

Preparing for Google Analytics 4

If you haven’t already heard, Universal Analytics is being shut down. If you haven't already, it's time to migrate to the new Google Analytics 4. This blog provides a quick summary of some key differences between UA and GA4.

Our Courses.

Our courses consist of a series of remote meetings focused on marketing theory, practical skill building, and real world application on your accounts. After one of our workshops, you'll own advertising software accounts of the highest quality, as well as the skills to make them even better over time.

Each course has been approved for substantial public subsidization in Saskatchewan and Alberta.

Your Marketing, Your Way.

Don't let your marketing agency hold you hostage. Take back control of your marketing and advertising strategy with one of DHMG's private digital marketing skills development workshops.

Funding Available
Expert Guidance
Engage in Conversation
Measure Your Growth