Skip to main content

Google Tag Manager setup: how to create your first tag

Adam Englebright7 February 20202 min read
Google Tag Manager setup: how to create your first tag

Creating your first GTM tag

This is the third of a series dedicated to introducing you, faithful reader, to the wonders and delights of Google Tag Manager. Last time, we took a high-level look at GTM and how it works, and today we'll be looking at how to set up a simple tag.

Setting up a Google Analytics pageview tag

We're going to set up a Google Analytics pageview tag. This replaces the old hardcoded GA that you'd used to have to put on every page of the site. We start by going to tags and selecting the "New" button in the top-right.

Configuring the tag

The tag creation pane slides over, and we click into the Tag Configuration block there to open the tag template menu:

Choosing the template and track type

Select Universal Analytics from the list, because that's the tag template we're using here:

There's the option to select between pageview, event, and some other track types but we're going to stick with Pageview.

Creating the GA settings variable

Then we have to select what variable is going to contain our settings. There's no settings variable yet, so we're going to create a new one by selecting "New Variable" at the bottom there:

This highlights something quite important about GTM—you can do things in several different ways. If I'd thought ahead, I could've created my GA settings variable beforehand, but since I didn't I can create it 'on the fly' while making my tag, without having to back out of the tag creation interface. Here, I'm going to add my tracking ID (not real) and give my variable a name. We'll leave Cookie Domain set to auto:

That's all the configuration we need to do for this tag's settings for the time being!

Adding a trigger and saving

All that remains is adding a name and a trigger. We add the name by editing the name field at the top, and the trigger by clicking the block at the bottom:

There's only one built-in trigger in GTM, but fortunately that's the one we want—All Pages; as this is replacing the GA code we'd put on all pages to fire:

Now we're done, we just need to click the Save button in the top-right:

First tag complete

Now you've set up your first tag! Next time, we’ll be looking at testing the tag we've just implemented! If you have any questions, please get in touch 🙂


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