# Google Tag Manager setup: how to create your first tag

> Learn how to set up your first tag with Google Tag Manager (GTM), a simple step‑by‑step guide to replacing manual GA code. Start tracking today!

Source: https://www.measurelab.co.uk/insights/blog/google-tag-manager-basics-3-your-first-tag/  
Author: Adam Englebright  
Published: 2020-02-07  
Updated: 2026-01-27

### Creating your first GTM tag

This is the third of [a series](https://www.measurelab.co.uk/insights/tag/gtm-basics/) dedicated to introducing you, faithful reader, to the wonders and delights of Google Tag Manager. [Last time](https://www.measurelab.co.uk/insights/google-tag-manager-basics-2-a-closer-look-at-gtm/), 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.

![](https://storage.ghost.io/c/2b/29/2b2922bc-51da-44ac-8a48-6f70d3ab322e/content/images/2025/07/cool_tag_manager.png)

### 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.

![](https://storage.ghost.io/c/2b/29/2b2922bc-51da-44ac-8a48-6f70d3ab322e/content/images/2025/07/screenshot-2020-02-04-at-16-48-05.png)

### Configuring the tag

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

![](https://storage.ghost.io/c/2b/29/2b2922bc-51da-44ac-8a48-6f70d3ab322e/content/images/2025/07/screenshot-2020-02-04-at-16-48-12.png)

#### Choosing the template and track type

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

![](https://storage.ghost.io/c/2b/29/2b2922bc-51da-44ac-8a48-6f70d3ab322e/content/images/2025/07/screenshot-2020-02-04-at-16-48-19.png)

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:

![](https://storage.ghost.io/c/2b/29/2b2922bc-51da-44ac-8a48-6f70d3ab322e/content/images/2025/07/screenshot-2020-02-04-at-16-48-33.png)

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`:

![](https://storage.ghost.io/c/2b/29/2b2922bc-51da-44ac-8a48-6f70d3ab322e/content/images/2025/07/screenshot-2020-02-04-at-16-48-57.png)

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:

![](https://storage.ghost.io/c/2b/29/2b2922bc-51da-44ac-8a48-6f70d3ab322e/content/images/2025/07/screenshot-2020-02-04-at-16-49-22.png)

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:

![](https://storage.ghost.io/c/2b/29/2b2922bc-51da-44ac-8a48-6f70d3ab322e/content/images/2025/07/screenshot-2020-02-04-at-16-49-28.png)

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

![](https://storage.ghost.io/c/2b/29/2b2922bc-51da-44ac-8a48-6f70d3ab322e/content/images/2025/07/screenshot-2020-02-04-at-16-49-39-1.png)

### 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](mailto:adam@measurelab.co.uk) 🙂
