Is your GA4 data actually right? Get a fixed-price GA4 & GTM audit. Request an audit
noxtag
Consent

Google Consent Mode v2: how to implement it correctly in GTM

In short
  • Consent Mode v2 uses four signals: analytics_storage, ad_storage, ad_user_data and ad_personalization.
  • Set defaults on the Consent Initialization trigger before any tag fires; the banner must then send a consent update.
  • GA4 behavioral modeling needs 1,000+ denied events a day for 7 days and 1,000+ consented daily users on 7 of the last 28 days.

Google Consent Mode tells Google's tags what a visitor has agreed to, so they can adjust their behaviour. When consent is denied, Google tags stop setting cookies, but (in advanced mode) they still send anonymous, cookieless pings. Google uses those pings to model the conversions and behaviour it can no longer observe directly.

Consent Mode v2 added two signals for advertising, ad_user_data and ad_personalization. If you advertise with Google to visitors in the EEA or UK, these signals are required to keep using features like remarketing and conversion measurement fully.

This guide covers what to set, where to set it in Google Tag Manager, and how to check it actually works. That last part is where most implementations fail.

The four consent signals Google tags read
The four consent signals Google tags read
Consent type Controls Typical banner category
analytics_storage Analytics cookies (GA4 client ID, session) Analytics / Statistics
ad_storage Advertising cookies (Ads, Floodlight) Marketing / Advertising
ad_user_data Sending user data to Google for advertising Marketing / Advertising
ad_personalization Using data for personalised ads (remarketing) Marketing / Personalisation

There are also functionality_storage, personalization_storage and security_storage. Google's tags don't read them, but you can use them for your own tags.

Basic blocks Google tags until consent; advanced sends cookieless pings
Basic blocks Google tags until consent; advanced sends cookieless pings
  • Basic mode: Google tags are blocked until the visitor consents. If they decline, Google receives nothing. Modeling then relies on a general model rather than your own data.
  • Advanced mode: Google tags load immediately with consent defaulted to denied. Before consent they send cookieless pings (no cookies, no identifiers), and after consent they behave normally. This feeds your property's own modeling.

Advanced mode recovers more data. Basic mode is the more conservative legal choice. Which one you use is a decision for whoever owns privacy compliance at your company, not just the analytics team.

Is your GA4 & GTM setup collecting the right data?

Get a senior review of your tags, triggers, data layer and consent setup, with a prioritized fix list your developers can act on.

Fixed price · Read-only access · Reply within 1 business day
The order of operations on every page load
The order of operations on every page load
  1. Defaults are set first, before any Google tag runs: usually everything denied for EEA/UK visitors.
  2. The consent banner (CMP) loads and reads any stored choice.
  3. If the visitor has already chosen, the CMP sends an update immediately.
  4. If not, the banner shows. When they choose, the CMP sends an update with the new state.
  5. Google tags adjust: they set cookies only for granted types, and send cookieless pings for denied ones (advanced mode).

The critical rule is order. If a GA4 tag fires before the default is set, it fires with no consent state at all.

Implementing it in Google Tag Manager

Most CMPs (Cookiebot, OneTrust, Usercentrics, CookieYes, Didomi and others) provide a GTM template that sets defaults and sends updates for you.

  1. Add the CMP's template from the GTM Community Template Gallery.
  2. Fire it on the Consent Initialization – All Pages trigger.
  3. In the template, set default states per region: denied for EEA/UK, and whatever your policy says elsewhere.
  4. Map the CMP's categories to the four Google consent types.
  5. Enable Admin → Container settings → Enable consent overview, then check each tag's consent settings.

Option B: set it yourself with gtag

If your CMP has no template, set defaults before the GTM snippet:

<script>
  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',
    wait_for_update: 500,
    region: ['AT','BE','BG','HR','CY','CZ','DK','EE','FI','FR','DE','GR','HU','IS','IE','IT','LV','LI','LT','LU','MT','NL','NO','PL','PT','RO','SK','SI','ES','SE','GB','CH']
  });
</script>
<!-- Google Tag Manager snippet goes here -->

Then, when the visitor makes a choice, your banner calls:

gtag('consent', 'update', {
  ad_storage: 'granted',
  ad_user_data: 'granted',
  ad_personalization: 'granted',
  analytics_storage: 'granted'
});

wait_for_update gives the banner up to that many milliseconds to send an update before tags fire with the default.

Non-Google tags don't read consent mode automatically. In GTM, give each one additional consent checks (for example, require ad_storage for the Meta Pixel), or fire it only from a consent-based trigger.

Behavioral modeling: will GA4 fill the gaps?

In advanced mode, GA4 can model the behaviour of visitors who declined, but only for properties above Google's thresholds. According to Google's help centre, the property needs:

  • at least 1,000 events a day with analytics_storage denied, for at least 7 days, and
  • at least 1,000 daily users with analytics_storage granted, for at least 7 of the previous 28 days.

Google also notes that meeting these doesn't guarantee modeling, because the model has its own quality checks.

Google's published thresholds for GA4 behavioral modeling
Google's published thresholds for GA4 behavioral modeling

Smaller sites usually never qualify. For them, the benefit of advanced mode is mainly in Google Ads conversion modeling, not GA4 reports.

Six checks that catch almost every broken consent setup
Six checks that catch almost every broken consent setup
  1. Tag Assistant / GTM Preview: open the Consent tab for the first event. Defaults should be present on Consent Initialization, before any tag fires.
  2. Decline, then check the network: filter by collect. In advanced mode you'll still see GA4 requests, but with gcs=G100 and no _ga cookie set.
  3. Accept, then check again: the next request should show gcs=G111, and the _ga cookie should exist.
  4. Change your mind: reopen the banner, withdraw consent and confirm an update to denied is sent.
  5. Check other tags: Meta, TikTok and LinkedIn shouldn't fire before consent if your policy requires it.
  6. Check by region: test from an EEA IP (or with a VPN) as well as from elsewhere, if your defaults differ by region.

The gcs parameter encodes the state: G1 followed by one digit for ad storage and one for analytics storage, where 1 is granted and 0 is denied.

The mistakes we see most

  • Banner hides itself but never calls update. Everything stays denied forever, and GA4 traffic drops off a cliff.
  • Defaults set after GTM loads, so the first hits go out with no consent state.
  • Only two of the four signals set. That's v1-style consent, missing ad_user_data and ad_personalization.
  • Non-Google tags ignored. The Meta Pixel fires regardless of the banner.
  • Region list wrong. UK or Switzerland is left out of the denied-by-default list.

Consent bugs are invisible until someone compares numbers months later. Our GA4 & GTM audit includes a full consent test across regions, banners and tags, and the fix list to make it compliant and measurable.

This guide explains how the technology works. It isn't legal advice. Decide on basic vs advanced mode and your regional defaults with your privacy or legal team.

noxtag is a small, senior tracking-implementation practice. We write these guides from real GA4 and GTM audits. More about us.