Which GTM trigger for GA4 tags: Initialization, Page View, DOM Ready or Window Loaded.
- “Which GTM trigger should I use for GA4”
- “Initialization vs Page View trigger GTM”
- “GA4 Configuration tag trigger Initialization or All Pages”
- “GTM DOM Ready vs Window Loaded for GA4”
- “gtm.js vs gtm.dom vs gtm.load”
- “Consent Initialization vs Initialization trigger”
- “GA4 event tag trigger in Google Tag Manager”
- “GTM page load trigger order”
Baris Asa, tracking consultant, London · Last checked: 15 November 2026
Put the Google tag on Initialization - All Pages and the cookie banner on Consent Initialization. GA4 event tags that need the site’s data, such as purchase, go on a Custom Event trigger named after the push. Use Page View for events that need only the visit and DOM Ready for tags that read the page’s HTML. Window Loaded almost never.The Google tag is what GTM used to call the GA4 Configuration tag.
How you’d notice the triggers are wrong. Three signs in the reports:
- Purchases or product views in GA4 with no value or no items, while the shop admin has them. An event tag fires before the site sends its data.
- Fewer purchases in GA4 than orders in the shop, by more than usual. One possible cause: a purchase tag moved to Window Loaded.
- Page views roughly doubled after a container change. A second
page_viewtag on All Pages.
Not in GTM yourself? Ask whoever owns the container for a Preview screenshot of a product page and the order confirmation page. If view_item or purchase fires on “Container Loaded” rather than on its own named step, it’s on the wrong trigger.
Three terms, once. A push is the site’s code handing data to GTM through the dataLayer. A Custom Event trigger fires when a push carries a named event, such as purchase. A message is one step in Preview’s left-hand list: each trigger moment and each push gets one.
Which trigger for each GA4 tag?
| Tag | Trigger | Why |
|---|---|---|
| Cookie banner template (CMP) | Consent Initialization - All Pages | Sets consent before any Google tag |
Google tag (your G- ID) | Initialization - All Pages | Google: fires before other triggers |
| GA4 event fed by a push (purchase, lead) | Custom Event, name = the pushed event | Fires on the push, data present |
| GA4 event that needs only the visit | Page View, Some Pages | Needs no site data |
| GA4 event reading the page’s HTML | DOM Ready | Page HTML is built by then |
| Anything needing every image loaded | Window Loaded | Fires last; rarely right for GA4 |
Clicks, forms and scrolls have their own trigger types. Single-page app route changes are covered below.
In what order do the page-load triggers fire?
Google’s page view trigger guide lists five, in this order:
- Consent Initialization. For tags that set or update consent.
- Initialization. For tags that must fire early but don’t handle consent.
- Page View. As the browser begins to load the page. The built-in All Pages trigger is this type.
- DOM Ready. Once the browser has built the page’s HTML.
- Window Loaded. Once the page has fully loaded, images and scripts included.
Preview shows Page View as “Container Loaded”. In the dataLayer the last three are gtm.js, gtm.dom and gtm.load, the names you’ll see in forum answers.
Custom Events are not in that sequence. They fire whenever the site pushes. A tag that reads undefined because its push came later is a timing fault, on file as F-103 and diagnosed in GTM tag fires before the dataLayer is ready. This page is about choosing the trigger so it doesn’t happen.
Why does the Google tag go on Initialization, not All Pages?
All Pages usually works. Initialization is Google’s documented setting: the setup guide says to use “Initialization - All pages” so the Google tag fires before other triggers.
On All Pages, the Google tag and any event tags on that trigger fire on the same message. Tag firing priority in each tag’s advanced settings can set which starts first, though not that it has finished first, and it is one more setting to keep right on every tag. Initialization puts the Google tag a step ahead of all of them and needs no upkeep.
Consent goes one step earlier still. The banner’s template sets the default on Consent Initialization, and the Google tag reads it on Initialization. A banner tag on Initialization or later can let the Google tag fire before the default exists. The full sequence is in How to implement Consent Mode v2 correctly in GTM.
When are Page View, DOM Ready and Window Loaded right?
- Page View suits an event that only needs the visit: the path, the title, the fact that someone reached the pricing page. Filter it with Some Pages. Don’t add a GA4 Event tag named
page_viewhere. Unless you’ve setsend_page_viewtofalseon the Google tag, it already sends one on each load, so a second tag sendingpage_viewto the same stream counts every view twice. - DOM Ready suits a tag whose variables read the page’s HTML, such as a DOM Element variable that takes the product name from a heading. Google’s guide says page view tags that read the DOM should use it. The forum fix “switch it to DOM Ready” helps only when the push runs before the HTML finishes parsing: inline, synchronous or deferred scripts. If an async script, a cart or an API pushes the data, it doesn’t. Why is in the F-103 note.
- Window Loaded fires after every image and script on the page has loaded. My reading: a tag on Window Loaded can’t fire for a visitor who leaves before then, so for GA4 events it can lose data. Moving a purchase tag there “to be safe” usually hides a timing fault rather than fixing it.
How do I set up a Custom Event trigger for a GA4 event?
In GTM: Triggers, New, Custom Event. Type the event name exactly as the site pushes it. In Preview, Purchase and purchase show as different events, so copy the name from the left-hand list. If you tick “use regex matching” to cover several events, keep the pattern narrow, such as ^(add_to_cart|purchase)$. Google warns that .* matches every event, including the ones GTM and the Google tag emit themselves. Then attach the GA4 event tag and remove its page-load trigger.
Which trigger counts GA4 page views in a single-page app?
A single-page app (many headless shop front ends) changes the URL without a full page load, so none of the five page-load triggers fires again. Choose one way to count those views:
- GA4 enhanced measurement. Google says page views can be sent when the browser history state changes, and an advanced setting, “Page changes based on browser history events”, controls whether those history events count. Nothing to build in GTM.
- A History Change trigger in GTM. Google says it fires when the URL fragment changes or the site uses the HTML5
pushStateAPI. Use it when you send the virtual page view yourself, and untick “Page changes based on browser history events” in the web stream’s enhanced measurement settings.
Running both counts each route change twice. A GA4 event that needs the new route’s data still goes on a Custom Event the developer pushes once that data is ready.
How do I check which trigger each tag fires on?
For the person in GTM:
- Load a page in Preview. The left-hand list shows each message in the order it arrived: the five page-load messages, with each custom event by name wherever the site pushed it.
- Click each message, not Summary, and read Tags Fired. Summary merges everything and hides which message did the work.
- For each GA4 event tag, open Variables on the message it fired on. Every value should resolve.
| Tag | Before | After |
|---|---|---|
| Cookie banner template | All Pages | Consent Initialization |
| Google tag | All Pages | Initialization |
| GA4 purchase | Window Loaded | Custom Event purchase |
Extra GA4 page_view tag | All Pages | removed |
The Before column is a composite of what I see in containers I open, not one account: everything on All Pages, a purchase tag moved to Window Loaded at some point to fix missing values, and a second page_view tag that doubles views. After, each tag has the one trigger that matches what it needs.
If your container looks like the Before column, I re-trigger each tag and send a Preview screenshot per tag as proof. That’s the Google Tag Manager consultant work.
If Preview won’t open at all, that’s a different problem: GTM Preview won’t connect. The push shape and trigger for each ecommerce step are in How to set up GA4 ecommerce tracking with GTM.
Common questions
Which trigger should the Google tag use in GTM?
Initialization - All Pages. That is Google’s documented setting, so the Google tag fires before other triggers. Only the cookie banner, on Consent Initialization, should fire earlier.
Is All Pages wrong for the Google tag?
Not broken, just less certain. On All Pages the Google tag fires on the same message as any event tags on that trigger. Initialization puts it a step ahead of all of them with nothing to maintain.
Should GA4 event tags fire on Page View or a Custom Event?
Custom Event, if the tag needs anything the site pushes: purchase, add_to_cart, view_item, a lead. The trigger’s event name matches the pushed event exactly. Page View only if the tag needs nothing but the visit.
What is the difference between Consent Initialization and Initialization?
Consent Initialization comes first and is for tags that set or update consent, such as the banner’s template. Initialization comes next and is for tags that must fire early but don’t handle consent, such as the Google tag.
When should I use DOM Ready or Window Loaded for a GA4 tag?
DOM Ready when a variable reads the page’s HTML. Window Loaded almost never for GA4, in my experience: it waits for every image and script, and a tag can’t fire for someone who left before then. Neither waits for data an app, cart or API pushes.
Do I need a GA4 page_view tag on All Pages?
Usually not. Unless you’ve turned off the Google tag’s automatic page view, it already sends one per load. A second page_view tag on All Pages doubles the count.
Sources
Read on 15 November 2026:
- Google Tag Manager Help, page view triggers (the five page-load trigger types and their order; Consent Initialization for tags that set or update consent; Initialization for tags that must fire early but don’t handle consent; Page View as the page begins to load; DOM Ready for page view tags that read the DOM; Window Loaded after images and scripts)
- Google Tag Manager Help, set up your Google tag in Tag Manager (use the “Initialization - All pages” trigger so the Google tag fires before other triggers), Google tag in Tag Manager (the Google tag replaces the GA4 Configuration tag) and tag firing priority (Advanced Settings; higher priority fires first, default 0)
- Google Tag Manager Help, custom event trigger (fires on an event pushed to the data layer; “use regex matching”;
.*matches all detected events, including those GTM and the Google tag emit) and history change trigger (fires when the URL fragment changes or the site usespushState; for virtual page views in single-page apps) - Google for Developers, the data layer (messages processed first in, first out, one at a time; add an event name to the push and listen for it with a Custom Event trigger)
- Google for Developers, measure pageviews (the Google tag sends a page view by default;
send_page_viewset tofalseturns it off; “Page changes based on browser history events”) - Google Analytics Help, enhanced measurement events (page views on each page load or browser history change; an advanced setting controls history-based page views)
- Simo Ahava, trigger guide for Google Tag Manager (Page View fires on
gtm.js, DOM Ready ongtm.dom, Window Loaded ongtm.load)