Google Tag Manager, often called GTM, is the tool that lets you add and manage tracking tags on your website without editing code every time marketing needs a change. A tag is a small piece of code that sends data somewhere, such as Google Analytics, a conversions tracker, or a remarketing pixel. Before GTM, each new tag meant a developer task, a code release, and a wait. With GTM, you add the tag once inside a container, set the rule for when it should fire, test it in Preview mode, and publish.
What Google Tag Manager Is and What It Is Not
Think of GTM as a control panel for your tags. Your website loads one GTM container, and that container decides which tags run, on which pages, and under which conditions. Google Analytics is the tool that reports what visitors did. GTM is the tool that sends the data to Analytics and to other platforms. That distinction matters, because installing GTM on its own does not give you analytics reports. You still need a GA4 tag inside GTM, pointing at your GA4 property, before any page views appear in your reports. Many beginners install the container, check Analytics, see nothing, and assume GTM is broken, when in fact the tag was never added.
Setting Up Your First GTM Account and Container
Go to Google Tag Manager and sign in with the Google account you use for Analytics. Create an account, giving it your company or website name, then create a container for your website and choose Web as the platform. GTM will show you two snippets of code: one for the head of every page and one for the body. Install both, in the places GTM specifies, and do not skip the body snippet, because it keeps basic tracking working for visitors whose browsers limit scripts. If you use a content management system, use its official GTM integration or a trusted plugin rather than pasting code into a theme file you might overwrite on the next update.
Adding Your GA4 Tag the Right Way
Your first tag should be the GA4 configuration tag, because it is the foundation for everything else. In GTM, create a new tag, choose the Google Analytics GA4 Configuration tag type, and enter your GA4 measurement ID, which starts with G followed by letters and numbers, and which you can find in your GA4 property settings. Set the trigger to All Pages, or to the initialisation trigger if your setup uses one, so the tag fires on every page load. Save the tag, enter Preview mode, load your site, and confirm the tag fires and that a page view reaches GA4. Check the GA4 real time report while you browse.
Triggers and Variables: The Rules That Make Tags Smart
A trigger is the rule that decides when a tag fires. All Pages is a trigger. A click on a specific button is a trigger. A form submission, a scroll past half the page, or a visit to a thank you page can all be triggers. A variable is a piece of information GTM can use inside a tag or a trigger, such as the page URL, the text of the button that was clicked, or a value from the data layer. Together, triggers and variables turn a blunt tool into a precise one. Instead of firing a conversion tag on every page, you fire it only when the thank you page loads, or only when the button with the right text is clicked.
Preview, Debug, and Publish Without Breaking Anything
Preview mode is where GTM earns its keep. When you open Preview, GTM loads a debug version of your container on your site and shows a panel listing every event, every tag that fired, and every tag that did not. Walk through the visitor journey you care about: load the home page, visit a service page, submit a test form, click a phone link. At each step, check that the right tags fired and that no tag fired twice. A tag that fires twice will double count a conversion, and that error can distort reporting for weeks before anyone notices. If you find a duplicate, fix the trigger before you publish, not after.
The Data Layer and Server Side Tagging
The data layer is a structured list of information about the page or the visitor that your website pushes to GTM, such as the page type, the product category, or the value of an order. Instead of asking GTM to guess that information from the page text, the data layer states it plainly, which makes triggers and variables far more reliable. A typical example is an order confirmation page that pushes the order value and the order ID. GTM reads those values, passes the value to your conversion tag, and your reports show real revenue instead of a count of conversions with no value attached. Our own guidance on internal linking strategy makes a similar point about structure: clean, deliberate structure pays off every time you build on it.
Server side tagging moves part of the tagging work from the visitor browser to a server you control. The browser sends data to your tagging server, and the server forwards it to Analytics and other platforms. The main benefits are better control over what data leaves your site, fewer third party scripts in the browser, and more resilient tracking when browsers block cookies or scripts. The trade off is real: you need to set up and maintain a tagging server, which costs money and needs monitoring, and the setup is more complex than standard GTM. Before you commit, read the Google tag platform developer documentation for the current architecture, and test on a staging site first.
Consent Mode and Keeping Your Container Healthy
Consent mode lets you adjust how Google tags behave based on whether a visitor has accepted analytics or advertising cookies. When a visitor declines, tags run in a limited mode that does not store identifying cookies, while still sending basic, privacy preserving signals that help model overall behaviour. Set up consent mode together with a proper consent banner, not as a substitute for one. The banner collects the choice, consent mode respects it, and GTM carries it through to your tags.
That discipline connects directly to the rest of your marketing. Accurate tracking tells you which content earns attention, so start at ourex.pro, read the outreach metrics that tell you what is actually working, run our backlink profile audit checklist, and use our link insertion service and our SaaS link building strategies to turn clean tracking into earned placements.
FAQs
Is Google Tag Manager free?
Yes, the standard version of Google Tag Manager is free to use. You create an account, add a container to your website, and manage tags, triggers, and variables without paying for the tool itself. Server side tagging is the exception, because it needs a tagging server, which carries hosting costs.
Do I still need Google Analytics if I install GTM?
Yes. GTM manages tags, while Google Analytics reports what visitors did. Installing GTM alone gives you no reports. You need to add a GA4 tag inside GTM, pointing at your GA4 property, before page views appear in Analytics.
What is the difference between a tag, a trigger, and a variable?
A tag is the code that sends data to a platform, such as GA4. A trigger is the rule that decides when the tag fires, such as a page load or a button click. A variable is a piece of information GTM can use, such as the page URL or a value from the data layer, inside a tag or a trigger.
How do I test changes before they go live?
Use Preview mode. It loads a debug version of your container, shows which events happened, and lists every tag that fired and every tag that did not. Walk through the visitor journey, fix anything that fires twice or not at all, and only then publish with a clear version name and description.

