Google Tag Manager

GTM Triggers Explained: When Your Tags Should Fire

What triggers are in Google Tag Manager, every trigger type and what it's for, and how to build firing conditions that hit exactly the pages you mean.

9 min read
Quick answer

A trigger is the rule that tells Google Tag Manager when to fire a tag. Every tag needs at least one. Triggers listen for things happening on your page (a page loading, a click, a scroll, a form submission) and fire the attached tags when their conditions match. The trigger types fall into four groups: page view triggers, click triggers, user engagement triggers (scroll depth, forms, video, element visibility), and other triggers (custom events, timers, history changes). Most marketers get a long way with three: All Pages, a link click trigger, and a custom event trigger.

Every tag in Google Tag Manager answers two questions: what should happen, and when. Triggers are the “when,” and they’re where most GTM confusion lives, because the trigger picker offers more than a dozen types and gives you no hint about which three you’ll actually use.

This guide explains how triggers work, walks every trigger type with its real-world use, and covers the firing conditions and exceptions that make triggers precise. It assumes you know what GTM is; if not, start with the Tag Manager beginner’s guide and come back.

How triggers actually work

When a page with GTM loads, the container starts listening. Everything that happens (the page loading, clicks, scrolling, form submissions) becomes an event inside GTM, and each event is checked against your triggers. When an event matches a trigger’s conditions, every tag attached to that trigger fires.

Three rules govern the matching:

  1. A tag fires if any of its triggers match. Multiple triggers on one tag are OR, not AND.
  2. Conditions within a trigger are AND. A trigger with “Page URL contains /pricing” and “Click Text equals Buy” requires both.
  3. Exceptions beat firing triggers. If an exception trigger matches, the tag stays silent no matter what else matched.

You build triggers under Triggers > New in your workspace, then attach them when configuring a tag.

The trigger types, grouped the way GTM groups them

Page view triggers

These fire during page load, and the type you pick decides how early:

  • Consent Initialization and Initialization: the very first moments of the page. Consent Initialization is reserved for consent tools; Initialization is for tags that should run before everything else, and Google’s own setup flow suggests the built-in Initialization - All Pages trigger for your Google tag so configuration fires before any event tags. Beyond that, most marketers rarely build custom triggers of these types.
  • Page View: fires as soon as GTM starts. This is what the built-in All Pages trigger uses, and it’s the common home for tags that should run everywhere, like your GA4 tag (here’s that setup).
  • DOM Ready: fires once the page’s HTML is fully parsed. Use it when a tag needs to read something from the page, like a data layer value rendered into the HTML.
  • Window Loaded: fires when everything, including images, has finished loading. Use it for low-priority tags that shouldn’t compete with page rendering.

When in doubt: Page View for analytics, DOM Ready when a tag reads the page, Window Loaded for nice-to-haves.

Click triggers

Two types, and choosing the right one matters:

  • Just Links listens only to clicks on links and includes a “wait for tags” option so the hit gets sent before the browser navigates away. Use it for outbound links, file downloads, and any click that leaves the page.
  • All Elements listens to clicks on anything: buttons, images, menu toggles, divs. Use it for interactions that stay on the page.

Both come with a decision: fire on all clicks or some clicks. You’ll almost always pick “some clicks” and add a condition like Click Text, Click Classes, or Click URL. Our button click tracking tutorial walks through this end to end, including the step people miss: enabling the built-in Click variables so those conditions have values to match against.

User engagement triggers

Four types that listen for behavior beyond clicks:

  • Scroll Depth: fires at percentage or pixel thresholds (25/50/75/90 are the common ones) so you can measure how far people actually read.
  • Form Submission: fires when a form submits. It works cleanly on classic forms and unreliably on many modern JavaScript forms, which submit without the browser-level signal this trigger listens for. When it fails, the fix is usually a custom event pushed by the form tool, or a thank-you page trigger instead.
  • Element Visibility: fires when a chosen element scrolls into view. Great for “did anyone actually see the signup box” questions.
  • YouTube Video: fires on play, pause, progress points (percentage or time based), and completion for embedded YouTube players.

Other triggers

The remaining types cover the gaps:

  • Custom Event: fires when your site pushes a named event into the data layer (dataLayer.push({event: 'signup_complete'})). This is the workhorse of serious setups, because your developers or platform can announce exactly what happened, and GTM listens for it by name. Event names are case-sensitive.
  • History Change: fires when the URL changes without a page load, which is how single-page applications navigate. If your site is built on React or similar and you only track Page View, you’ll miss every navigation after the first; this trigger closes that gap.
  • Timer: fires on an interval, like every 30 seconds, for “still here” style tracking.
  • JavaScript Error: fires when the page throws an error. Occasionally useful as a canary, rarely part of marketing measurement.
  • Trigger Group: fires only after several other triggers have all fired, for “scrolled AND spent 60 seconds” style combinations.

Making triggers precise: conditions

The difference between clean data and a container that fires on everything is the conditions panel. A few habits:

Match on the most stable attribute. Button text changes with copy edits; CSS classes change with redesigns. When you can, match Click ID or a data attribute your developer sets deliberately. When you can’t, know that a rewrite of “Buy now” to “Get started” silently kills your trigger.

Mind the URL details. “Page URL equals” fails on trailing slashes, query strings, and http/https differences. “Contains” or “matches RegEx” with a deliberate pattern is usually safer than “equals.”

Use Preview before publishing, every time. GTM’s Preview mode shows each event and, crucially, the values every variable held at that moment. When a trigger doesn’t fire, the answer is almost always visible there: the Click Text wasn’t what you assumed, or the variable you’re matching on was undefined. Publishing untested triggers is how containers rot.

Exceptions: the “except when” rule

Any tag can carry exception triggers alongside its firing triggers. The tag fires when a firing trigger matches, unless an exception matches too; exceptions always win.

Typical uses:

  • Fire a chat widget on All Pages, except the checkout flow.
  • Fire GA4 everywhere, except when an internal-user cookie is present.
  • Fire a promo pixel sitewide, except the pages where it double-counts with a platform integration.

Build the exception as a normal trigger (often a Page View trigger with a URL condition), then attach it in the tag’s “Exceptions” section.

The starter set

If you’re setting up a container today, you can go far with:

  1. All Pages (built in) for your GA4 tag.
  2. One click trigger for your most important button or link, built per the click tracking guide.
  3. One Custom Event trigger for whatever your platform announces, like a form tool’s submission event.

Add the rest when a real question demands them, and name each one so its job is obvious; the naming conventions guide has the system we use. If GTM isn’t on your site yet, the installation guide gets you there first.

Frequently asked questions

What is a trigger in Google Tag Manager?
A trigger is the condition that makes a tag fire. Tags are the 'what' (send a GA4 event, load the Meta Pixel) and triggers are the 'when' (on every page, when someone clicks a button, when a form submits). A tag without a trigger never fires at all.
What's the difference between the All Elements and Just Links click triggers?
Just Links only listens to clicks on links (a tags) and waits briefly so the click can be recorded before the browser navigates away. All Elements listens to clicks on anything: buttons, images, divs, links. If you're tracking clicks that navigate somewhere, use Just Links; for buttons and other non-link elements, use All Elements.
Why isn't my trigger firing?
The three usual causes: the built-in variables the trigger relies on aren't enabled (click triggers need the Click variables turned on), the condition is too exact (Page URL equals with a trailing-slash or query-string mismatch, or a case difference), or the thing you're targeting is inside an iframe GTM can't see. Test in Preview mode and inspect the event's variables to see what values GTM actually received.
What is a trigger exception?
An exception is a blocking rule attached to a tag: the tag fires when its firing trigger matches, unless an exception trigger also matches. Use exceptions to keep a tag off specific pages (like a thank-you page) or environments without rebuilding the firing trigger. Exceptions always win over firing triggers.
How many triggers should a tag have?
As few as express the rule. A tag fires if any one of its triggers matches (OR logic), so attach two triggers only when you genuinely mean 'in either situation.' If you find yourself stacking many similar triggers on one tag, that's usually a sign the condition belongs inside one trigger with better matching rules, or in a variable.

Keep learning