Guide 82 · Consent · GA4 + Tag Manager
Consent mode in Tag Manager: the Consent Initialization trigger runs your defaults first
In Tag Manager, consent defaults belong on the Consent Initialization trigger, which fires before every other trigger. Put the default there and the Google tag obeys it.
After the trace, the Consent Initialization trigger fires first on every page, the defaults are set before the Google tag loads, and the Google tag fires on Initialization as usual.
Download the reference: the consent mode tag manager container (JSON) (1110 bytes, MD5 2e464a16581bc00d46610906c88eabd4). It holds the worked example from this guide with every figure recomputed. The file was built for this guide and checked the same day; it was not exported from a live property.
What you need
- A Tag Manager container with the Google tag already installed.
- A consent template from your consent platform, or a custom HTML tag carrying the gtag consent default call.
- Editor access to the container, so you can publish the change.
The trace
- Open Tags, then New, and name the tag so its job is plain, for example CMP Consent Defaults. The name should say it sets defaults, not that it measures anything.
- Choose the tag type your consent platform provides. A consent platform template sets the default on the Consent Initialization trigger. Without a template, use a Custom HTML tag with the gtag consent default call for all four types, each set to denied.
- Set the trigger to Consent Initialization - All Pages. Its built-in trigger ID is 2147479583. It fires before any other trigger, including Initialization, which is why the default belongs on it and nowhere else.
- Keep the Google tag on Initialization - All Initialization Events, trigger ID 2147479573. That tag loads the property, sets cookies when consent allows, and sends page_view. Do not move it to Consent Initialization.
- Preview the container with Tag Assistant. On the first page event, the defaults tag must fire before the Google tag. If the order is reversed, the default arrived too late and the Google tag loaded without a state.
- Publish as a version, then test both answers in the banner. Deny, and confirm no Analytics cookies are set. Grant, and confirm full measurement follows. The download carries the container fragment with both tags and the trigger IDs.
Dead ends
DEAD END — DEFAULTS ON ALL PAGES. All Pages fires after Consent Initialization. A default on All Pages can run after the Google tag, which is too late.
DEAD END — THE GOOGLE TAG ON CONSENT INITIALIZATION. The Google tag belongs on Initialization. Moving it to Consent Initialization changes when the property loads and breaks the ordering the two triggers exist to provide.
DEAD END — PREVIEW SHOWS THE DRAFT. Preview runs the workspace draft only in the browser where you started it. Nobody else sees the defaults until you publish a version.
End state
Two triggers, two jobs: Consent Initialization, ID 2147479583, sets the four defaults to denied first, and Initialization, ID 2147479573, loads the Google tag. Preview proves the order before you publish.
Sources
- Tag Manager Help — Set up Google Analytics in Tag Manager — the Google tag, the Tag ID, the Initialization trigger, and Preview verification
- Analytics Help — About consent mode — defaults set to denied before tags load, and tags with built-in consent checks
Checked 11 November 2026. The click paths above are the ones in Google's help and developer pages, opened 11 November 2026. No step in this guide was run inside a live Analytics property or a live Tag Manager container, because both need a Google sign-in and this site does not sign in as anyone. The figures on this page were recomputed in Python 3 and are shown in the downloadable file, which was checked the same day. Google moves menu items without warning; if a path on this page no longer matches, the linked help page is the current map.