Google Tag Manager: what it is and how to use it

Google Tag Manager: what it is and how to use it

Google Tag Manager (GTM) is a free tool for managing tracking codes (tags) on a website without editing the site code each time. You install one container, then add and change tags for GA4, Google Ads, Meta, LinkedIn and others in GTM's interface.

The building blocks

ElementWhat it is
TagCode that sends data, for example a GA4 event
TriggerWhen the tag fires, for example a click or a purchase
VariableValues used by tags and triggers, such as page URL or order value
Data layerA structured object the site uses to pass data to GTM

Getting started

  1. Create an account and container.
  2. Add the GTM code to every page.
  3. Add the Google tag and GA4 events.
  4. Set up Consent Mode with your consent platform.
  5. Test in Preview and publish with a clear version name.

Best practice

Use the data layer rather than scraping the page, name everything consistently, use folders, limit who can publish and consider server-side tagging.

Frequently asked questions

Is Google Tag Manager free?

Yes.

What is the difference between GTM and Google Analytics?

GTM manages tags and sends data. Google Analytics stores and reports it.

Read also

Sources

  1. Google Tag Manager Help: support.google.com/tagmanager/answer/6102821

More about Marius Vestlien Hansen →

Read next

More articles

All articles
Next step

Get in touch for a coffee and a chat about how I can strengthen your business

Book a coffee chat