Data & Tracking
What is Google Tag Manager? How to install it and set it up properly
Copy for AI
Google Tag Manager (GTM) is a free Google tool that lets you place and manage measurement codes, known as tags, on your website without editing your site’s code every time. You install a container once, and from then on you add GA4, Google Ads conversions, the Meta pixel or the LinkedIn Insight Tag through a web interface. For each tag you decide when it fires and which data it sends.
That sounds like a detail for developers, but it is the backbone of your measurement. Almost every tracking audit we run starts in the GTM container, and almost every measurement problem (duplicate conversions, missing leads, tags firing without consent) lives there too. This article explains what GTM does, how to install it, how to build a container that is still readable a year from now and how to check that everything works. It belongs with our overview of what website tracking is.
What exactly is Google Tag Manager?
GTM is a tag management system. Instead of pasting ten scripts from ten platforms into your website, you place one script: the container. Everything after that, you manage in the Tag Manager interface. Google puts it this way: to use Tag Manager you add two snippets of code to each page of your website, after which your site communicates with the Tag Manager servers and you manage your tags from the web interface.
The benefit comes down to three things:
- Speed. Measuring a new conversion or adding a pixel no longer costs a developer sprint.
- Control. Every change gets a version. If something breaks, you roll back to the previous version.
- Consent in one place. Your cookie banner and the consent signals steer all tags centrally, instead of script by script.
GTM versus Google Analytics: what is the difference?
This is the question we get most often. GA4 is an analytics platform: it receives data, stores it and shows reports. GTM is the courier: it decides which data goes to GA4, Google Ads, Meta or LinkedIn, and when. GTM has no reports of its own. So you can install GA4 without GTM (with the Google tag directly in your code), and you can use GTM without GA4 (for Google Ads conversions only, for example). In practice you use them together, because GTM becomes the one place where your measurement logic lives.
| Google Tag Manager | Google Analytics 4 | |
|---|---|---|
| Role | Manages and fires tags | Collects and reports data |
| Reports | None | Yes, plus explorations and BigQuery export |
| Who works in it | Tracking specialist, developer | Marketer, analyst, management |
| Price | Free (360 version for enterprise) | Free (360 version for enterprise) |
The three building blocks: tags, triggers and variables
Understand these three concepts and you can read any container.
- Tags are the actions: “send a GA4 event”, “report a Google Ads conversion”, “load the Meta pixel”.
- Triggers decide when a tag fires: on every page view, on a button click, on a form submission, or when the website pushes a specific event into the data layer.
- Variables supply the data: the URL, the text of a button, an order value or the lead type.
Underneath sits the data layer: a JavaScript object in which your website prepares structured information for GTM, such as event: 'generate_lead' with the form type and the value. A setup that relies on the data layer is sturdier than one that clicks on CSS classes and button labels, because those change with every redesign. Also read our explanation of event tracking for the events you really need in B2B.
Installing Google Tag Manager in five steps
- Create an account and a container. Go to tagmanager.google.com, create an account in your company’s name (not in the name of a freelancer or agency) and choose “Web” as the target platform.
- Place the two snippets. Google asks you to paste the first code block as high in the
<head>as possible and the second immediately after the opening<body>tag, on every page. On WordPress, Shopify or Webflow you do this through the theme or an official integration, not through a random plugin that adds scripts of its own. - Set up your consent layer first. Put your cookie banner’s tag on the “Consent Initialization - All Pages” trigger and set the default consent to denied. How that works with Cookiebot is covered in our guide to Cookiebot pricing, GTM setup and Consent Mode v2.
- Add the Google tag and your first events. Start with the Google tag for GA4, then the events that actually drive your business: lead form, demo request, quote request, phone click.
- Test in Preview and publish with a version name. Give every version a name that says what changed (“GA4 generate_lead on contact form”), so you know later what you are rolling back.
How do you set up a container that is still readable a year from now?
A container grows fast. After two campaigns and a redesign it holds 60 tags, and nobody knows which ones are still needed. These agreements prevent that:
- A fixed naming convention. For example
GA4 - event - generate_lead,Ads - conversion - demo,Meta - Lead. Triggers and variables follow the same pattern. - Folders per platform. GA4, Google Ads, Meta, LinkedIn, Consent, Utilities.
- One source of truth for conversions. Fire Google Ads conversions from the same data layer events as GA4, so you do not end up with two definitions of “lead”. Why those numbers still differ is explained in the difference between Google Ads and GA4 conversions.
- No hard-coded scripts next to GTM. If the Google tag also sits directly in your theme, you count everything twice.
- Workspaces and a simple approval. Whoever makes a change does not publish it without a second pair of eyes.
For ad platforms you build on top of the same events: Enhanced Conversions in Google Ads, and the Meta pixel with the same lead events. If you want to make measurement more resilient against ad blockers and browser restrictions, a server-side container comes on top. That is the subject of our guide to server-side tagging and the practical side of hosting with Stape.
The mistakes we come across most often
In containers we take over, we see the same five problems again and again:
- Duplicate conversions. A form tag fires on “Form Submission” and again on the thank-you page. Google Ads sees two leads, your CRM sees one. This is also the classic cause of “an unrealistic number of conversions” in Google Ads.
- Tags firing before consent. The cookie banner sits on a regular All Pages trigger instead of Consent Initialization, so the first page view goes out without a consent state. Under the rules of the Belgian Data Protection Authority, analytics cookies are not strictly necessary and therefore require prior consent.
- Triggers on button labels. “Send” becomes “Submit” in a translation, and your lead measurement goes silent without anyone noticing.
- Old Universal Analytics tags. They no longer send anything, but they slow the page down and clutter the container.
- No owner. Nobody knows who published what. Version names and a changelog solve that.
How do you check that Google Tag Manager works?
Test every change before you publish. Click Preview in your workspace: Tag Manager then opens Google Tag Assistant in a new tab, where you see which tags fired, on which trigger and with which data. Then run through this checklist:
| Check | Where | What you want to see |
|---|---|---|
| Container loads on every page | Tag Assistant | Container ID on home, blog, thank-you page |
| Consent state before the first tag | Tag Assistant, Consent tab | Default denied, update after a click on the banner |
| Lead event fires once | Tag Assistant + GA4 DebugView | One generate_lead per submission |
| Google Ads conversion arrives | Google Ads, conversion diagnostics | Status active, no duplicate actions |
| Meta event arrives | Meta Events Manager, Test Events | Lead event with the right parameters |
If it checks out in Preview, compare the leads in GA4 and Google Ads with your CRM after a week. A difference of a few percent is normal (consent, ad blockers). A difference of half is a setup error. Our list of common Google Analytics tracking errors helps you find it.
When should a specialist set up GTM?
A marketer with some patience can build a basic container with GA4 and one conversion. It becomes specialist work as soon as multiple platforms, Consent Mode v2, a data layer with ecommerce or lead data, offline conversions from your CRM or a server-side container come into play. That is where small mistakes start costing money, because your bids are steered by them.
This is how we approached it at Kaizo: one GTM container as the central layer for GA4, Google Ads and Meta, fed by the same lead events. Read the setup in the case Kaizo: Google Ads conversion tracking. At Tryve we built conversion tracking around real enquiries, and at Suivo lead tracking all the way into the CRM.
Not sure whether your current container is right? With a tracking audit we go through your GTM, consent and conversions and you get a prioritised list. If you want it built or cleaned up straight away, our tracking specialist does it end to end. Pricing is on request, depending on your stack.
Frequently asked questions
Is Google Tag Manager free?
Yes. The standard version of Google Tag Manager is free, with no limit on the number of tags. There is a paid 360 version within Google Marketing Platform for large organisations, with extra approval flows and support. For a server-side container you do pay for hosting, for example through Google Cloud or Stape.
Do I need GA4 if I use Google Tag Manager?
Does Google Tag Manager slow down my website?
The container itself is light. What slows things down are the tags you load into it: every chat widget, heatmap and pixel adds weight. A tidy container with only the tags you need is often faster than a site with the same scripts hard-coded.
Can I remove or block Google Tag Manager?
You can remove GTM by taking the two snippets out of your code, but then all the measurement that runs on it disappears. Visitors can block GTM with an ad blocker; that is exactly why some companies add a server-side container on their own subdomain.
What is the difference between the Google tag (gtag.js) and GTM?
The Google tag is a single script for Google products, placed directly in your code. GTM is a management layer that loads the Google tag and tags from other platforms. Use one of the two for the same measurement, not both, or you will count twice.
Free website scan
Enter your website and get an automatic scan within minutes, with concrete technical and SEO improvements. No sales pitch.
We only use your details for your scan. No spam, unsubscribe anytime.