What consent mode changes
Before consent mode existed, a tag either ran or it did not. Sites that respected a refusal blocked the tag entirely and lost the visit from every report; sites that wanted the data ignored the refusal. Consent mode replaces that binary with a state that tags can read. Google's tags check the state before writing or reading storage and before sending data for advertising purposes, and they behave differently depending on what is granted. Analytics without storage consent does not set its identifying cookie; advertising tags without storage consent do not persist click identifiers; tags without permission for advertising data do not send it. The reports still exist, and Google fills the gaps with modelled data where the implementation allows.
The mechanism is a set of commands pushed to the data layer. A default command, issued before any Google tag
loads, declares the starting state for each consent type. An update command, issued when the visitor
decides, changes it. Google's tags are built to watch for both; everything in Tag Manager's consent features is
a way of issuing those commands and of making non-Google tags respect the result.
What consent mode does not do matters just as much. It does not ask the visitor anything: the banner does that. It does not decide which consent types a given law requires, which regions need a banner, or how the banner must be worded. Those questions are the subject of the privacy, consent and measurement guide, and this page assumes they have been answered.
Consent types and default states
Google defines a fixed set of consent types. The first four govern how Google's own tags behave; the last three exist so that your other tags can be gated on the same choices.
| Consent type | What it governs | Typical default |
|---|---|---|
ad_storage | Storage related to advertising, such as click identifiers and conversion cookies | Denied until granted |
analytics_storage | Storage related to analytics, such as the identifier that links a visitor's sessions | Denied until granted |
ad_user_data | Whether user data may be sent to Google for advertising purposes | Denied until granted |
ad_personalization | Whether data may be used for personalised advertising, including remarketing lists | Denied until granted |
functionality_storage | Storage that supports site functionality, such as language or display settings | Depends on the site's policy |
personalization_storage | Storage for personalisation that is not advertising, such as content recommendations | Depends on the site's policy |
security_storage | Storage needed for security, authentication and fraud prevention | Usually granted |
Defaults are declared per page load, before the Google tag, with the default command. The command accepts a
region list so that one page can declare denied defaults for regions where a banner is required and granted
defaults elsewhere; a command without a region applies everywhere not covered by a more specific one. It also
accepts a wait_for_update value that tells tags to hold for a short period in case the banner's answer is
already known and arrives immediately, which prevents the first page view from being sent cookieless for a
visitor who consented on a previous visit. The update command sets the new state, and Google documents that
the state persists only for the page; the consent platform is responsible for remembering the choice and
re-issuing the update on later pages.
A minimal default command looks like this:
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
analytics_storage: 'denied'
});
The order is the whole game. If this runs after the Google tag has loaded, the tag has already made its decisions as though consent were granted, and the later denial cannot undo cookies that were set.
Basic vs advanced consent mode
Google documents two implementations, and the difference is what happens before the visitor chooses and after they decline.
In the basic implementation, Google tags are prevented from loading until the visitor interacts with the banner. Nothing is sent before a choice is made, and if the visitor declines, nothing is sent at all. The tags behave exactly as a blocked tag would; consent mode's contribution is that, when consent is granted, the tags load with the right state already set. Because no data arrives from people who decline, Google's modelling for those visitors rests on a more general model rather than on anything observed from your site.
In the advanced implementation, Google tags load as soon as the page does, with defaults set to denied. Before the visitor chooses, and if they decline, the tags send what Google calls cookieless pings: requests that carry no identifying cookies and no persistent identifiers, but do carry the consent state, the page, basic request information and a non-identifying random value. When consent is granted, the tags switch to full measurement. The pings give Google's models a view of consented and unconsented traffic on the same site, which is what makes behavioural modelling in GA4Google's event-based analytics platform. and the more detailed conversion modelling in Google Ads possible.
| Row label | Basic | Advanced |
|---|---|---|
| Tags load before the choice | No | Yes, with denied defaults |
| Data sent when declined | None | Cookieless pings without identifiers |
| Cookies when declined | None | None |
| Modelling input | General model only | Site-specific pings plus consented data |
| Implementation effort | Lower: block tags until consent | Higher: defaults, updates and verification |
| Typical reason to choose | A policy that no request may leave before consent | Wanting modelled reporting and a fuller picture |
Which is appropriate is a legal and policy decision as much as a measurement one. Some organisations conclude that any request before consent is unacceptable regardless of its contents; others accept the cookieless pings as described in Google's documentation. The privacy guide covers how to reach that decision. What this page can say is that the measurement outcome differs materially, and the choice should be made knowingly rather than inherited from whatever the consent platform's template defaulted to.
Wiring a consent banner in GTM
Tag Manager offers four pieces that together implement consent mode, and most sites use all of them.
Consent overview. Enabled in the container settings, it adds a consent column to the tag list and a summary showing, for every tag, whether it has built-in consent checks, additional checks, or none. Turn it on first; it is the audit view for everything below.
The consent initialisation trigger. Tag Manager provides a trigger type that fires before every other trigger on the page, including the ordinary initialisation and page view triggers. It exists for exactly one purpose: to run the tag that sets consent defaults, or the consent platform's template, before any tag that might read the state. Nothing else belongs on it.
Consent platform templates. Most consent management platformsSoftware that collects, stores and passes on visitors' consent choices for cookies and tracking. publish a tag template in the community gallery. The template sets the defaults on the consent initialisation trigger, loads the banner, and issues the update when the visitor chooses. Using the vendor's template avoids writing the commands by hand, but you still own the configuration: the default states, the regions, and whether the template implements the basic or advanced pattern.
Consent settings on each tag. Google's tags carry built-in consent checks and need no further
configuration. Every other tag has a consent section where you can require additional consent types; a tag
that requires ad_storage, for example, is held back until that type is granted. This is how a pixel or a
chat widget deployed as a custom HTML tag respects the same choice without a separate blocking trigger. The
tags, triggers and variables guide explains how trigger exceptions
worked before consent settings existed and why the settings are easier to audit.
For a site without a vendor template, the default command above goes in a custom HTML tag on the consent initialisation trigger, and the banner's own callback issues the update, typically by pushing an event to the data layer that a second tag listens for:
gtag('consent', 'update', {
ad_storage: 'granted',
ad_user_data: 'granted',
ad_personalization: 'granted',
analytics_storage: 'granted'
});
Two configuration options sit alongside the consent types. Google documents an ads_data_redaction setting
that removes advertising click identifiers from requests when ad_storage is denied, and a url_passthrough
setting that carries click information through internal links when cookies cannot store it. Both are
documented on the consent page in sources, and both need a deliberate decision rather than a default.
If the Google tag is hard-coded in the page template above the container snippet, the default command must be hard-coded above it too; a default issued from inside Tag Manager arrives after a tag that loaded before the container.
Verifying consent signals
A consent implementation is verified by testing three states on every template: before the choice, after a refusal, and after a grant. The preview mode tutorial covers the mechanics of Tag Assistant; the consent-specific checks are these.
In Tag Assistant, the Consent tab for each event shows the on-page default state, any on-page update, and the consent status each tag saw when it was evaluated. Load the page with no prior choice: the first events should show every advertising and analytics type as denied by default, issued on the consent initialisation event and before the Google tag's own event. Decline: no update should appear, Google tags should still fire if you are running the advanced pattern, and tags with additional consent requirements should be listed as not fired for that reason. Accept: an update event should appear, the state should flip to granted, and held-back tags should fire.
In the browser, check storage directly. With analytics_storage denied, the analytics cookie should be absent;
with ad_storage denied, no advertising cookies should be written. In the network panel, the requests from
Google tags carry a consent-state parameter (gcs is the documented one for the storage types) whose value
encodes what was granted; Google documents how to read it. A request sent before the choice that shows storage
as granted means the default ran too late.
After publishing, confirm the signals are arriving at the destination. GA4's admin area reports whether consent signals are being received for the property, and Google Ads conversion diagnostics report the consent status seen by the conversion tag. Repeat the three-state test on every distinct template, including checkout and logged-in pages, and in each region where the defaults differ, because a template that loads a script before the container is the classic way one page breaks an otherwise correct implementation. Before a new or changed banner goes live, the consent banner QA checklist puts these three-state tests in one list to tick alongside the banner's wording, its records and the measurement drop to expect. The privacy and consent operations playbook makes this three-state test a step whenever a tool, tag or banner setting changes, alongside the checks that withdrawals and suppressions reach every other tool.
What modelling needs
Modelling is the reason most teams accept the complexity of the advanced pattern, and it has conditions that Google documents rather than guarantees.
For behavioural modelling in GA4, the property must use the advanced implementation so that cookieless pings arrive, consent mode must be active across the site rather than on a few pages, the property must meet Google's documented data thresholds over the documented period, and the reporting identity must be set to an option that includes modelled data. Properties below the thresholds, or with consent mode on only part of the site, simply do not get modelled behavioural data, and nothing in the interface explains why beyond the eligibility notes in the help centre. A reporting identity that includes modelled data is also one under which GA4 can withhold small report rows, the separate privacy mechanism known as data thresholdsThe GA4 mechanism that withholds report rows that could identify individuals, usually small segments over short periods, when signals or modelling are used..
For conversion modellingConversions a platform estimates statistically for activity it could not observe directly, such as unconsented or cross-device journeys. in Google Ads, the account needs consent mode signals on its conversion tags; the advanced pattern gives the models site-specific input, while the basic pattern falls back on the general model. Modelled conversions appear inside the ordinary conversion columns, and they are distributed by the account's AttributionAssigning conversion credit to touchpoints. model like observed ones, so a change to the consent implementation shows up as a change in reported conversions without any change in actual behaviour. Date-annotate the switch.
Modelling and enhanced conversions are often confused. Enhanced
conversions recover matches for consented conversions by sending hashed first-party data, and they require the
ad_user_data signal to be granted; modelling estimates what unconsented visitors did. One improves the
measured part, the other estimates the unmeasured part, and a complete setup uses both.
Switching a retailer from basic to advanced
A European fashion retailer runs the basic pattern through its consent platform's template. About 55% of
visitors accept, so GA4 reports roughly 55% of real sessions and Google Ads attributes conversions only to that
share. The analytics lead proposes the advanced pattern. Legal reviews Google's description of cookieless pings
and agrees, provided the defaults stay denied for the EEA and the UK and the ads_data_redaction option is
on. After the switch, GA4 behavioural modelling becomes available 4 weeks later once the property passes the
eligibility check, reported sessions rise to around 85% of the server-side page view count, and Google Ads
reports 22% more conversions over the following month with spend unchanged. The team annotates the date in
every report and re-runs the three-state test on the checkout template, which turns out to load a payment
script above the container; that script is moved below it in the following release.
If reported figures fell further than the decline rate after a banner launch, the diagnosis page for a data drop after a cookie banner separates the expected loss from implementation errors.
If a clean first visit shows cookies or vendor requests before any choice, the page on Tag Manager tags firing before consent audits the first page load and closes each gap.
Common mistakes
- Defaults issued after the Google tag. The tag has already set cookies; the denial arrives too late. Put the default on the consent initialisation trigger, or hard-code it above a hard-coded Google tag.
- One default for every region. Sites that need a banner in some markets and not others end up either
over-blocking or under-asking; use the
regionlist. - Forgetting the newer signals.
ad_user_dataandad_personalizationare separate types; a template written before they existed sets neither, and Google's advertising features depend on them for traffic in the regions its consent policy covers. - Non-Google tags with no consent settings. Built-in checks only cover Google's tags; everything else needs additional consent requirements or it runs regardless.
- Testing only the accept path. The refusal path is where cookies leak and where tags fire that should not.
- Choosing basic or advanced by accident. The consent platform's template picked one; nobody read which.
- Reading a consent-rate change as a behaviour change. A banner redesign moves every downstream metric.
- Treating consent mode as compliance. It carries the answer; the question, the wording and the lawful basis are the privacy guide's subject, and the Tag Manager hub links the rest of the implementation guides.
