Ad glossary · Tracking and data · Checked 2026-10-23
What is GTM: tags, triggers, variables, and how it differs from GA4
GTM (Google Tag Manager) is a tag management system: install its container code on the site once, then set up and publish tracking tags such as GA4 and the Meta Pixel from the GTM interface without editing the site each time.
- English
- Google Tag Manager (GTM)
- Also called
- Google Tag Manager
- Area
- Tracking and data
How it is used
GTM is built from three things: tags (the tracking code to run), triggers (when to run it) and variables (the values it needs). Test every change in Preview mode before publishing a new version.
| Part | What it does | Example |
|---|---|---|
| Tag | The tracking code to run | A GA4 event, the Meta Pixel |
| Trigger | When to run it | A page view, a click, a form submission, a custom event |
| Variable | A value the tag needs | Click URL, an order value read from the data layer |
Three parts
A tag is the tracking code to run (a GA4 event, the Meta Pixel); a trigger decides when (a page view, a click, a form submission, a custom event); a variable is a value it needs (the URL, the clicked text, the order value). Together with their settings, Google calls this a container.
The sturdiest setup: the site pushes its own events into the data layer.
At the key moments (a form sent, a purchase made) the site runs dataLayer.push and GTM catches it with a custom event trigger. Do not key on a button’s CSS class; a redesign breaks it without a sound.
Preview before you publish
Changes in GTM go live only when you publish. Use Preview mode to click through your own site and check that each tag fires at the right moment with the right values, then publish.
Example
A purchase skeleton: the thank-you page runs dataLayer.push({ event: 'purchase', value: 1200, currency: 'TWD' }); GTM has a custom event trigger for purchase, two data layer variables (value and currency), and that one trigger sends the purchase to both GA4 and the Meta Pixel.
Not to be confused with
GA4: GTM neither collects data nor reports; it only deploys the tags.
FAQ
What is the difference between GTM and GA4?
GTM places tags on the site and decides when they fire; GA4 collects the data and reports on it. GTM itself records nothing.
Why has my GTM change not taken effect?
Most often it was saved but never published. Changes go live only when you publish a new version; use Preview mode first to check the tag fires at the right moment.
Where the course puts it to work
Official sources
We read each page below on 2026-10-23 and built the definition from it.
- Introduction to Tag Manager · Checked 2026-10-23
- About Tags · Checked 2026-10-23
- Specifications for Meta Pixel Standard Events · Checked 2026-10-23
- The data layer · Checked 2026-10-23