Skip to main content

Google Tag Manager basics: a closer look at GTM’s core concepts

Adam Englebright24 January 20203 min read
Google Tag Manager basics: a closer look at GTM’s core concepts

Exploring GTM core concepts

This is the second of a series dedicated to introducing you, faithful reader, to the wonders and delights of Google Tag Manager. Last time, we were looking at just what a tag manager is anyway? This time, we'll be taking a look at GTM itself.

We're going to go through the three key components of GTM: tags, triggers and variables. We're not going to touch on the other things in the GTM sidebar, folders and templates, for the time being—they're useful extensions but not truly core functionality in the way that these three are.

Understanding tags

We'll start with tags, since they're in the name—they're the components within GTM that send information to outside providers. You have tags to send information to Google Analytics or Doubleclick or whoever you want—or, if you'd like, to change things on the site.

Templated vs custom tags

Tags are just blocks of code; and in GTM they come in two varieties— templated and custom. Templated tags are provider-specific, and quite straightforward–you just fill in the boxes! They're a "friendly face" so that you don't have to deal directly with code. Custom tags are blank canvases, and powerful—you can do pretty much whatever you want with them! You can use them to add tags from providers who don't have templates—e.g. Facebook—or make changes to the site code itself¹.

Variables: GTM’s little Lego bricks

A lot of the information they send is provided by variables, which retrieve information either from the GTM itself, from the site or from the data layer.

Variables are little units of data, the icon for which looks like a Lego brick, which I personally think is delightful. They can return values about the page (its URL, for instance), or if you interact with something on the page—click on a link, say—return values about the element you interacted with (its URL or text). They can do all sorts of other things too—and we'll examine them as we get further into GTM.

Triggers: when tags fire

Variables are also used by triggers to determine when the tags should fire. There are a number of different types of trigger, based on all the different sorts of user interaction that GTM can listen out for—page view, link clicks, form submission etc. Then within that, you can specify additional conditions—this trigger will fire any tags attached to it when this event happens, provided this variable meets these conditions. For example, a link click trigger might only fire when the url being clicked on has a different hostname to the site hostname, and hence is outbound.

Wrapping up GTM basics

This was a quick overview of the different components of GTM. They might seem somewhat abstract, but once you start using the tool, they'll begin to become more concrete. Next time, we'll be looking at creating a simple tag in GTM! If you have any questions, please get in touch 🙂


¹: Since the addition of templates, it's now not necessary to run a lot of more common tags without providers as custom tags, as the community template gallery provides templates for many common but previously un-templated tags!


Suggested content

Measurelab awarded Google Cloud Marketing Analytics Specialisation

At the start of the year, if you’d asked us whether Measurelab would be standing shoulder to shoulder with Europe’s biggest consultancies by September, we would've been surprised. Not because we don't believe in ourselves, but because these things feel so distant - until suddenly, they’re not. So, here it is: we’ve been awarded the Marketing Analytics Services Partner Specialisation in Google Cloud Partner Advantage. What’s the big deal? In Google’s own words (with the obligatory Zs): “Spec

Will Hayes11 Sept 2025

BigQuery AI.GENERATE tutorial: turn SQL queries into AI-powered insights

BigQuery just got a major upgrade, you can now plug directly into Vertex AI using the new AI.GENERATE function. Translation: your analytics data and generative AI are now best friends, and they’re hanging out right inside SQL. That opens up a whole world of new analysis options for GA4 data, but it also raises some questions: * How do you actually set it up? * What’s it good for (and when should you avoid it)? * Why would you batch the query? Let’s walk through it step by step. Step 1: H

Katie Kaczmarek3 Sept 2025

How to start forecasting in BigQuery with zero training

If you’d told me five years ago that I’d be forecasting product demand using a model trained on 100 billion time points… without writing a single line of ML code… I probably would’ve asked how many coffees you’d had that day ☕️ But its a brand new world. And it’s possible. Let me explain What is TimesFM? TimesFM is a new foundation model from Google, built specifically for time-series forecasting. Think of it like GPT for time, instead of predicting the next word in a sentence, it predicts t

Katie Kaczmarek14 Jul 2025