Skip to content

GA4Published 8 min read

Consent Mode v2 Implementation Guide for Agencies

How to set up Google Consent Mode v2 with a CMP in GTM, choose basic or advanced mode, set regional defaults, and test that it actually works.

Muhammad Qitmeer, founder of Augere Labs
Muhammad Qitmeer
Co-founder and CEO, Augere Labs
Share

To implement Consent Mode v2, set a default consent state for all four parameters (ad_storage, analytics_storage, ad_user_data, ad_personalization) before any Google tag fires, connect a consent banner (CMP) that sends an update when the user chooses, and decide between basic mode (tags blocked until consent) and advanced mode (cookieless pings before consent, enabling better modeling). Set stricter defaults for EEA and UK visitors than for other regions if the client's legal advice allows, then verify the default and update states in Tag Assistant on real pages.

This guide is the technical side, written for agencies managing Google Ads and GA4 for clients. It is not legal advice. What the banner must say, which regions need opt-in, and whether advanced mode is acceptable are decisions for the client and their legal advisor. Our job is to make sure whatever they decide is implemented correctly and that the ad platforms receive the signals they need.

Why Consent Mode v2 matters to ad accounts

Google requires advertisers who serve ads to users in the EEA to pass consent signals, including the two parameters added in v2, for features such as remarketing audiences and some conversion measurement to keep working for those users. In practice, without a working consent mode setup on EEA and UK traffic, audiences shrink and conversion measurement and modeling degrade. For US-only clients the urgency is lower, though several US states have their own privacy laws and the client may still want a banner.

The four parameters

ParameterControlsAdded in
ad_storageWhether advertising cookies can be read or writtenv1
analytics_storageWhether analytics cookies (such as GA4's) can be read or writtenv1
ad_user_dataWhether user data can be sent to Google for advertising purposesv2
ad_personalizationWhether data can be used for personalized advertising such as remarketingv2

Each is either granted or denied. There are also non-Google storage types (functionality_storage, personalization_storage, security_storage) that some CMPs set; they matter for other tags but not for Google's measurement.

A common v1 leftover: a site that sets ad_storage and analytics_storage correctly but never sets the two v2 parameters. Google tags then treat those as missing, and the account does not get the benefit of the setup.

Basic vs advanced mode

BasicAdvanced
Before consentGoogle tags do not loadGoogle tags load with consent denied
If user declinesNothing is sentCookieless pings without identifiers are sent
Conversion modeling in Google AdsBased on a general modelBased on the advertiser's own pings, typically more accurate
GA4 behavioral modelingNot availableAvailable if thresholds are met
ImplementationBlock tags with consent checks or triggersLet tags fire; consent mode adjusts their behavior

Advanced mode gives better measurement. Basic mode is more conservative: nothing reaches Google until consent. Some clients and their advisors prefer basic for that reason. Present both, explain the measurement trade-off, and let the client decide. Document the decision.

The default state: before the banner loads

The default must be set before any Google tag sends data. This is the most important step and the one most often done wrong.

With gtag.js directly on the page, the default call goes above the Google tag snippet:

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
  ad_storage: 'denied',
  analytics_storage: 'denied',
  ad_user_data: 'denied',
  ad_personalization: 'denied',
  wait_for_update: 500
});

wait_for_update tells tags to wait up to that many milliseconds for an update from the banner before sending. It helps when the CMP loads asynchronously and a returning visitor has already consented.

In GTM, the default must be set by a tag on the Consent Initialization - All Pages trigger, which fires before all other triggers including Initialization and All Pages. Most CMP templates handle this when configured on that trigger.

Region-specific defaults

The default command accepts a region parameter with ISO country and subdivision codes. A common pattern is denied by default in the EEA, UK and Switzerland, and granted elsewhere, when the client's legal advice supports it:

gtag('consent', 'default', {
  ad_storage: 'denied',
  analytics_storage: 'denied',
  ad_user_data: 'denied',
  ad_personalization: 'denied',
  region: ['AT','BE','BG','HR','CY','CZ','DK','EE','FI','FR','DE','GR','HU','IE','IT','LV','LT','LU','MT','NL','PL','PT','RO','SK','SI','ES','SE','IS','LI','NO','GB','CH']
});
gtag('consent', 'default', {
  ad_storage: 'granted',
  analytics_storage: 'granted',
  ad_user_data: 'granted',
  ad_personalization: 'granted'
});

The more specific region setting wins for visitors in those regions. Most CMPs let you configure the same thing in their dashboard or GTM template, which is easier to maintain than a hand-written list. Check that the list matches the client's legal advice, and check it again if they expand into new markets.

Connecting a CMP through GTM

Most major CMPs, including Cookiebot, OneTrust, Usercentrics, CookieYes, Didomi and others, publish a GTM template in the Community Template Gallery that sets defaults and sends updates. The usual setup:

  1. Add the CMP's template from the gallery and create a tag with the client's CMP ID or domain group.
  2. Fire it on Consent Initialization - All Pages.
  3. Configure default states (and regions) in the template or in the CMP dashboard, including the two v2 parameters.
  4. Map the CMP's categories to Google's parameters. Typically marketing maps to ad_storage, ad_user_data and ad_personalization, and statistics or analytics maps to analytics_storage. Confirm the mapping in the template; do not assume.
  5. In GTM's container settings, enable the consent overview so you can see each tag's consent settings in one place.
  6. Remove any hardcoded CMP script that duplicates the GTM template.

Google tags vs other tags

Google tags (Google tag, GA4 events, Google Ads conversion and remarketing, Floodlight) have built-in consent checks and adjust their behavior automatically. Non-Google tags such as the Meta pixel, LinkedIn Insight, TikTok and Hotjar do not read consent mode. In GTM, give each of them "additional consent checks" that require the relevant consent, or trigger them on the CMP's consent event. Otherwise they fire regardless of what the user chose.

Optional settings: url_passthrough and ads_data_redaction

Two further settings are worth knowing, especially in advanced mode.

  • url_passthrough. When ad storage is denied, Google tags cannot store the click ID in a cookie. With URL passthrough enabled, the tag appends click information such as the GCLID to internal links as the visitor moves through the site, so a conversion on a later page can still be measured without cookies. Test it on sites with strict URL handling, since some CMSs or redirect rules strip or reject unknown parameters.
  • ads_data_redaction. When ad storage is denied and this is set to true, ad click identifiers in requests are redacted further and requests go through cookieless domains. It reduces what is sent at the cost of some measurement. Whether to use it is a client decision, like basic versus advanced.

Both can be set with gtag commands or in many CMP templates and in the Google tag settings in GTM. Neither replaces a correct default and update; they only change what tags do while consent is denied.

Effects on GA4 and Google Ads

Google Ads

With consent mode in place, Google Ads can model conversions from users who declined, and these appear in the normal conversion columns. The Google Ads conversion diagnostics show whether consent mode signals are being received. Advanced mode generally produces more useful modeling than basic. Enhanced conversions only use user data when ad_user_data is granted.

GA4

In GA4, users who decline are not counted as observed users. With advanced mode, GA4 can fill the gap with behavioral modeling, but only when the property meets eligibility thresholds. Google's published requirements include a minimum daily volume of events from users who declined analytics storage, and a minimum daily volume of users who granted it, sustained over a number of days. Smaller sites often never qualify. The property's reporting identity must also be set to blended for modeled data to show in reports.

Set expectations with the client: after a correct consent setup on EEA traffic, GA4 user and session counts often drop, because the site is now honoring choices it previously ignored. That is the setup working, not breaking. Record the go-live date so later reports can be read correctly. Our guide to GA4 vs Google Ads conversion discrepancies explains how modeling widens the gap between platforms.

Testing with Tag Assistant

  1. Open Tag Assistant and connect to the site in a fresh incognito window (no previous consent cookie).
  2. On the first page load, select the earliest event and open the Consent tab. You should see the On-page Default state for all four parameters, set before any tag fired.
  3. Accept all in the banner. The Consent tab on the next event should show an On-page Update with the parameters granted.
  4. Repeat with Reject all, then with partial choices (for example statistics only), and confirm the mapping behaves as expected.
  5. Check that no Google tag fired before the default state appears. If the Consent tab shows a tag firing ahead of it, the default is set too late.
  6. Reload the page after making a choice. The update should be applied again for a returning visitor, on every page.
  7. For advanced mode, inspect network requests to Google's collection endpoints and look at the gcs and gcd parameters, which encode consent state. With consent denied, requests should not set or read cookies.
  8. Test from a region that should get the strict default. A VPN or the CMP's own preview tools can help.
  9. Confirm non-Google tags (Meta, LinkedIn, TikTok) do not fire when marketing consent is denied.

Common mistakes

  • Defaults set too late. The default fires on All Pages or DOM Ready instead of Consent Initialization, so Google tags have already sent data without a consent state.
  • Banner never sends an update. The banner records the choice in its own cookie but is not connected to Google's consent mode, so everyone stays denied forever (or granted forever).
  • v2 parameters missing. Only ad_storage and analytics_storage are set.
  • Two CMPs or two default commands. A hardcoded script and a GTM template both setting defaults, sometimes with conflicting values.
  • Hardcoded gtag above the default. A theme or plugin loads the Google tag before the consent default runs.
  • Non-Google tags with no consent checks. The Meta pixel fires for everyone, regardless of choice.
  • Category mapping wrong. Analytics consent grants ad_storage, or marketing consent does not grant ad_user_data.
  • Server-side tagging assumed to bypass consent. It does not. Consent state travels with requests to a server container and must be respected there too; see server-side Google Tag Manager setup.

What we check in an audit

  • Whether a CMP is installed and connected to consent mode.
  • Default state timing and values for all four parameters, per region.
  • Update behavior for accept, reject, partial choice and returning visitors.
  • Basic or advanced mode, and whether it matches what the client decided.
  • Consent checks on every non-Google tag in the container.
  • Consent signals received in Google Ads diagnostics.
  • The GA4 reporting identity and whether modeling is eligible.

Getting consent mode right on client accounts

Consent mode is one of the checks in our GA4 audit. We test default and update states in Tag Assistant and fix the GTM side; what the banner must say stays a decision for the client and their legal advisor.

Just one quick fix, not a whole account? Our founder takes small fixed-price jobs on Fiverr: GA4 and Google Tag Manager tracking fix

Frequently asked questions

What is the difference between Consent Mode v1 and v2?

Version 2 adds two parameters, ad_user_data and ad_personalization, which control whether user data can be sent to Google for advertising and used for personalized ads. Both must be set alongside ad_storage and analytics_storage.

Should I use basic or advanced consent mode?

Advanced mode gives better conversion and behavioral modeling because tags send cookieless pings when consent is denied. Basic mode sends nothing until consent. The choice depends on the client's legal advice, so present the trade-off and document their decision.

Does a US-only client need Consent Mode v2?

Google's requirement is tied to users in the EEA, so it is less urgent for US-only traffic. Some US state privacy laws may still lead the client to use a banner, and consent mode makes that banner work properly with Google tags.

Why did GA4 traffic drop after implementing consent mode?

Users who decline analytics storage are no longer observed. That drop is usually the setup working correctly. Behavioral modeling can fill some of the gap if the property meets Google's thresholds and uses blended reporting identity.

Does consent mode control the Meta pixel?

No. Consent mode only changes the behavior of Google tags. Non-Google tags need their own consent checks in GTM or must be triggered only after the CMP reports marketing consent.

Is this legal advice?

No. This is a technical implementation guide. What the banner must do and which regions need opt-in consent are questions for the client's legal advisor.

Muhammad Qitmeer

Written by

Muhammad Qitmeer, founder of Augere Labs

Augere Labs is the white-label tracking partner behind marketing agencies. If a client account has numbers you don't trust, I'm happy to look at it with you and tell you straight what's wrong.

Connect on LinkedIn