Basics

Google Consent Mode v2, Explained in Plain English

What Google Consent Mode v2 is, its four consent signals, basic vs advanced mode, why EEA sites need it for ads, and how to check your setup is right.

By the allowedit team · Updated · 8 min read

The short answer

  • Consent Mode v2 is how your cookie banner tells Google tags what a visitor agreed to, using four signals: analytics_storage, ad_storage, ad_user_data and ad_personalization.
  • Since March 2024, Google needs ad_user_data and ad_personalization for visitors in the EEA before it will use their data for ad personalisation and some measurement.
  • Defaults must be set to denied before any Google tag loads, then updated when the visitor chooses. Getting the order wrong is the most common mistake.
  • Basic mode keeps Google tags off until consent; advanced mode loads them in a denied state that sends cookieless pings Google uses for modelling.

Google Consent Mode v2 is a small API that lets your cookie banner tell Google's tags what a visitor agreed to. The banner sets every signal to "denied" before any Google tag loads, then sends an update when the visitor makes a choice. Google needs these signals from visitors in the European Economic Area before it will use their data for ad personalisation and some measurement.

That's the whole idea. The rest of this guide covers what the signals mean, the difference between basic and advanced mode, and the mistakes that make a setup look right but behave wrong.

Consent Mode is a set of commands you push to the dataLayer (the queue that Google tags read from). It doesn't show anything to visitors and it doesn't collect consent. It's a messenger: your consent banner asks, Consent Mode passes the answer on.

Google tags that understand Consent Mode (Google Analytics 4, Google Ads, Floodlight and the Google tag in general) change how they behave based on those signals. With analytics denied, GA4 doesn't set its cookies. With ads denied, Google Ads doesn't set advertising cookies or use the visit for remarketing.

There are two commands:

  • consent default: what applies before the visitor chooses. It has to run before any Google tag loads.
  • consent update: what applies after the visitor clicks Accept, Reject or saves their preferences.

What changed in version 2?

Version 1 had two main signals, analytics_storage and ad_storage. Version 2, which Google made a requirement for EEA traffic in March 2024, adds two more about how Google may use data, not just whether cookies can be stored.

SignalWhat it controls
analytics_storageWhether analytics cookies (like GA4's _ga) can be read or written
ad_storageWhether advertising cookies can be read or written
ad_user_dataWhether the visitor's data can be sent to Google for advertising purposes
ad_personalizationWhether the data can be used for personalised ads and remarketing

There are also functionality_storage, personalization_storage and security_storage, which most banners map to their preferences and necessary categories.

The two new signals exist because of the EU's Digital Markets Act, which requires Google to have consent before it combines personal data across its services for ads. If you advertise with Google and get traffic from the EEA, missing v2 signals mean Google may stop using that traffic for remarketing audiences and personalised ads, and some conversion reporting gets less complete.

What do the defaults and the update look like?

A correct setup sets the defaults first, in the page <head>, before the Google tag or Tag Manager:

<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
  });
</script>

When the visitor accepts analytics but not marketing, the banner sends:

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

Defaults can also be set per region. You might default to denied in the EEA, the UK, Switzerland and Quebec, and to granted elsewhere, by passing a region list of country or subdivision codes (like "US-CA" or "CA-QC").

What's the difference between basic and advanced mode?

This is the choice that matters most, and it's about what happens before consent.

Basic mode

Google tags don't load at all until the visitor consents. If they reject, Google gets nothing from that visit. This is the simplest to explain to a regulator: no consent, no Google request.

The trade-off is data. Without any signal from people who decline, Google can't model their conversions, so your reports show only consenting visitors.

Advanced mode

Google tags load straight away in a denied state. They don't set cookies, but they send cookieless pings: small requests saying a page was viewed or a conversion happened, without identifiers stored on the device. Google uses these to model the behaviour of people who declined and fill the gaps in your reports.

Advanced mode gives fuller reporting. The trade-off is that a request still goes to Google before consent. Google describes the pings as cookieless and non-identifying, but some data protection authorities and lawyers are wary of any request to a third party before consent, because the request itself carries an IP address and browser details.

BasicAdvanced
Google tags before consentNot loadedLoaded, denied state
Requests to Google if declinedNoneCookieless pings
Conversion modellingLimitedFuller
Easiest to defendYesDepends on your adviser

There's no single right answer. If you're cautious, or most of your traffic is in the EU, basic mode is the safer default. If ad measurement is central to your business, talk to whoever handles your privacy advice about advanced mode.

What are ads_data_redaction and url_passthrough?

Two extra settings fine-tune what Google tags do when ad consent is denied:

  • ads_data_redaction: when ad_storage is denied, ad click identifiers (like gclid) in network requests are redacted, and requests go through a cookieless domain. Turning this on is the conservative choice.
  • url_passthrough: when cookies are denied, Google tags can pass click information through URL parameters as people move between your pages, so conversions can still be attributed. It adds parameters to your links, which some sites don't want.

Almost every broken setup comes down to order or coverage.

  1. Defaults set too late. If the Google tag or Tag Manager runs before the consent default command, the first hit goes out with no consent state. The banner script (or the defaults snippet) must be the first thing in the <head>.
  2. No update after the choice. The banner shows and records a choice, but never sends consent update, so Google treats everyone as denied forever. Analytics drops to near zero for consenting visitors too.
  3. Only v1 signals. The update sends ad_storage and analytics_storage but not ad_user_data or ad_personalization. Google then shows warnings in Ads and treats EEA traffic as missing consent.
  4. Non-Google tags ignored. Consent Mode only affects Google tags. A Meta Pixel, TikTok Pixel or Hotjar script doesn't read these signals, so it has to be blocked separately until consent. We cover that in how to block scripts until consent.
  5. Granted by default in the EEA. Some setups default everything to granted and rely on the banner to deny later. In opt-in regions, that means cookies are set before the visitor has said anything.

If you use Tag Manager, the defaults still have to run first. You can either load a consent tool before the GTM container, or use a Consent Mode template inside GTM that fires on the Consent Initialization trigger.

Inside GTM, Google tags have built-in consent checks. Non-Google tags need "Additional consent checks" in their advanced settings, or a trigger based on a consent event, so they only fire after the right category is granted. Our Google Tag Manager guide walks through it with allowedit's allowedit_consent event.

Consent Mode v2 is on every allowedit plan, including free. Here's what the script does:

  • Sets the defaults to denied before any tag loads, per region: opt-in regions (the EU and EEA, the UK, Switzerland and Quebec) start denied, and you choose the defaults for US states with privacy laws and everywhere else.
  • Sends consent update when the visitor chooses, with all four signals, including ad_user_data and ad_personalization.
  • Lets you pick advanced or basic mode, and turn on ads_data_redaction and url_passthrough.
  • Pushes an allowedit_consent event to the dataLayer after each choice, so you can trigger non-Google tags in Tag Manager.
  • Blocks 40+ known non-Google trackers, like the Meta Pixel and TikTok, until their category is allowed, because Consent Mode alone doesn't stop them.

The script is one tag in your <head>, served from the edge, so it can set the defaults before anything else runs. The getting started guide shows where it goes.

If you use Google Analytics 4 and have visitors in the EEA, yes, it's still worth it. Consent Mode is what tells GA4 not to set cookies until the visitor agrees, and in advanced mode it's what lets GA4 model the visitors who declined.

If you don't use any Google tags at all, Consent Mode does nothing for you. You still need a banner that blocks your other trackers until consent, which is the part the law actually cares about.

The short version

Consent Mode v2 is plumbing between your cookie banner and Google. Set the defaults first, send the update with all four signals, choose basic or advanced mode deliberately, and block the non-Google tags that don't listen to it. If those four things are right, Google gets what it needs and your visitors get what the law promises them.

This article explains how Google's tools work. It isn't legal advice: if you're deciding between basic and advanced mode for a regulated business, ask your own lawyer.

Frequently asked questions

Is Google Consent Mode v2 required by law?

No. It's a Google requirement, not a legal one. The law (GDPR and the ePrivacy rules) requires consent before non-essential cookies. Google requires Consent Mode v2 signals from EEA traffic before it uses that data for ad personalisation, remarketing and some conversion features.

Does Consent Mode replace a cookie banner?

No. Consent Mode only passes on a choice. You still need a banner that asks the visitor, records the answer and lets them change it later.

Should I use basic or advanced mode?

Basic mode is the cautious choice: Google tags don't load at all until consent. Advanced mode loads them in a denied state and sends cookieless pings, which gives Google more data for modelling. Some regulators and lawyers are wary of those pings, so ask your own adviser if you're unsure.

How do I check Consent Mode is working?

Open your site in a private window, open the browser console and type dataLayer. You should see a consent default command with denied values before any Google tag fires, then a consent update after you click a button in the banner. Google Tag Assistant shows the same thing step by step.

Does allowedit support Consent Mode v2?

Yes, on every plan including free. It sets the defaults per region before any tag loads, sends the update when the visitor chooses, and includes ad_user_data and ad_personalization, with advanced or basic mode and the ads_data_redaction and url_passthrough options.