Google Tag Manager (GTM) is a free tag management system from Google that lets you add and change tracking tags on your website without editing the site's code each time. You install two snippets of code once, then set up tags, triggers and variables in Tag Manager's web interface.
Tags are the bits of tracking code that send data somewhere, like Google Analytics 4, Google Ads or a third party tool. Tag Manager holds them all in one place, so you can add, test and change them without asking a developer to touch your site every time. It isn't the same thing as Google Analytics: if you're weighing those two up, read my comparison of Google Tag Manager and Google Analytics first. This page is about how Tag Manager itself works.
The four words you need: container, tag, trigger, variable
| Term | What it means in Google Tag Manager |
|---|---|
| Container | The collection of tags, triggers, variables and settings installed on one website or app |
| Tag | A piece of code that sends data, such as a Google Analytics, Google Ads, Floodlight or third party tag |
| Trigger | The rule that decides when a tag fires |
| Variable | A value a tag or trigger uses when it runs |
Google says one Tag Manager account per company is typical, with one container per website or app. Name the container after the top level URL of the site, not one container per page. There are five container types: Web, which is the one most businesses use, plus iOS, Android, AMP and Server. A single container can replace every tag you've coded into your site by hand.
Do you need Google Tag Manager at all?
Here's the bit people don't expect. Google's own comparison says you don't always need Tag Manager. If you only want the default numbers in Google Analytics 4, such as page views, clicks and scrolls, the plain Google tag is enough, and Google says it suits marketers who don't have a developer.
| Option | Code on your site | Sends data to | Cost |
|---|---|---|---|
| Google tag only | 1 snippet, usually set up from GA4 or Google Ads | Google Analytics 4, Google Ads | Free |
| gtag.js | 1 snippet plus your own JavaScript | Google services only | Free |
| Google Tag Manager | 2 snippets, one in the head and one in the body | Google, third party and custom tags | Free |
Tag Manager earns its place when you're running tags from more than Google, or when more than one person is changing them, because it adds workspaces and version control. Google also says that if your website system doesn't support Tag Manager, use gtag.js instead. And if you're on WordPress, Shopify or Wix, there's an integration that can set up the Google tag without you editing page code.
How to install Google Tag Manager
- Create a Tag Manager account and a web container at tagmanager.google.com.
- In the Workspace tab, click your container ID, which starts with GTM, to see the two snippets.
- Paste the first snippet as high in the head of every page as you can.
- Paste the second snippet, the noscript one, straight after the opening body tag on every page.
- Add the Google tag and any GA4 or Google Ads tags inside Tag Manager.
- Click Preview and test before you publish anything.
If you already have tags coded into your site, Google's best practice is to move them all over at once, but it isn't compulsory. Tag Manager will fire the tags you've moved alongside the ones still sitting in your site code.
Preview, publish and undo
This is where Tag Manager saves you from yourself. In your Workspace, click Preview, enter your website address and click Connect. Tag Assistant then shows you which tags fired and in what order, before anything goes live. If a page breaks in preview mode, untick Include debug signal in the URL and try again.
When it all looks right, click Submit, choose Publish and Create Version, check the Workspace Changes, add a version name and a short description, and click Publish. Every publish saves a version, so if someone publishes too early you can go back to an earlier one. Only users with Approve access or higher can create versions, which is worth setting up before you hand access to an agency or freelancer.
Don't skip the other search engine, see Bing Webmaster Tools.
Questions to ask before you install it
Two questions are worth answering first, because they change what you install and how quickly you'll get value from it.
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
- What's already on your site? Google says GA4 configuration tags were automatically upgraded to the Google tag. So if someone set up Analytics for you a while ago, check what's already running before you add Tag Manager on top, or you can end up sending the same data twice.
- Can you describe your first tag in one sentence? If you can, you're ready. For example: a Google Ads conversion tag (the tag) that fires when someone lands on your thank you page (the trigger), using the page address to recognise that page (the variable). If you can't say yet what you want to track, the Google tag on its own will cover you while you work it out.
Once tags are firing, the Clarity guide shows what visitors do.
My verdict
If you run a WordPress site and only want GA4 page views, you probably don't need Tag Manager yet. The Google tag will do. Set it up when a second person or an agency starts adding tags, or when you want a Meta pixel, a heatmap tool and Google Ads all firing from one place. Whatever you do, always preview before you publish. And if you're tracking campaigns, tag your links with a free UTM link builder so the data lands in the right place.
Frequently asked questions
Is Google Tag Manager free?
Yes. Google's comparison lists Google Tag Manager and gtag.js as free.
Is Google Tag Manager the same as Google Analytics?
No. Tag Manager is where you manage tracking tags; Google Analytics is where the data is reported. Tag Manager can send data to Google Analytics, Google Ads and third party tools.
How many containers do I need?
Google says to create one container per website or app, not one per page. One Tag Manager account per company is typical.
Where do the Google Tag Manager snippets go?
Google says to paste the first snippet as high in the head as possible and the second, the noscript snippet, immediately after the opening body tag, on every page.
Can I undo a change in Google Tag Manager?
Yes. Every publish creates a version, and Google says you can revert to an earlier version if something was published too early.