Consent Mode v2 is a signal, not a blocker: what to test after installing it
If you build sites for clients who run Google Ads or Analytics with EEA traffic, you have probably installed Consent Mode v2. Google has required it since March 2024. It's tempting to treat it as the consent layer of the
If you build sites for clients who run Google Ads or Analytics with EEA traffic, you have probably installed Consent Mode v2. Google has required it since March 2024. It's tempting to treat it as the consent layer of the site, and it isn't one. It is a set of flags your page passes to Google's own scripts. Whether anything is actually blocked depends on everything around it.
The mechanism in one paragraph
Consent Mode v2 has four signals. Two are original and two were added in v2:
-
ad_storage: may advertising cookies be set -
analytics_storage: may analytics cookies be set -
ad_user_data: may user data be sent to Google for advertising (new in v2) -
ad_personalization: may data be used for personalised ads (new in v2)
Your consent management platform (CMP) sets these. Google's tags read them. When consent is missing, the tags still fire, but they send "cookieless pings" with no cookies and no identifying data, and Google uses modelling to estimate the conversions it can't measure. That is the whole job.
Test it before you trust it
The test that matters is the one most setups skip: a real visitor's path, from a clean state, including a refusal.
1. Clean start. Open a private window, then DevTools → Network, tick "Preserve log", and load the site. Don't touch the banner.
2. Read the starting state. In the console:
dataLayer.filter(e => e && e[0] === 'consent')
You want a default entry with all four signals denied, and nothing else until the visitor makes a choice. The CMP should push it before any tag runs. For reference, a correct default looks like this:
gtag('consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied'
});
An empty result means Consent Mode isn't there at all. A default of granted is the misconfiguration to look out for. Consent Mode will then faithfully tell Google that consent exists from the first pageview, before the visitor has done anything.
3. Look past Google. While still in the untouched state, filter the Network tab for the other vendors on the site, for example:
connect.facebook.net analytics.tiktok.com hotjar.com clarity.ms
Anything here fired before consent, and Consent Mode had nothing to do with it.
4. Reject, then keep browsing. Clear the log, click "Reject all", and open two or three more pages. In our scans this second window, after the refusal, is the single most common point of failure. Trackers that should have stopped keep sending requests.
Four things Consent Mode doesn't cover
Non-Google scripts. Consent Mode only changes how Google's own tags behave. Meta Pixel, TikTok Pixel, Hotjar, Clarity, LinkedIn Insight Tag, Criteo and the rest don't read it. If one of them loads on page view whatever the consent state, Consent Mode won't stop it, detect it or warn you. It was never designed to.
Whether the CMP is wired correctly. Consent Mode trusts whatever state the CMP sets. A wrong default is a common misconfiguration, and nothing in the protocol flags it.
What happens after Reject. Many implementations are only tested on the happy path: the visitor accepts and the tags fire. Nobody clicks Reject and watches the Network tab.
Scripts outside any consent gate. A Hotjar snippet or a Facebook pixel pasted into the <head> loads on its own. Consent Mode has no visibility into it.
Where it fits in the bigger picture
GDPR and the ePrivacy Directive require that non-essential cookies and trackers don't fire until the visitor has given informed, specific, freely given consent. That applies to every vendor, not just Google. Consent Mode v2 covers one piece of that: Google's tools degrade gracefully when consent is missing. You still have to verify the rest yourself:
- that "Reject all" actually blocks third-party scripts
- that no scripts load before the banner has even rendered (a common race between the CMP and the page)
- that cookies set before consent are cleared on Reject, not left in place
- that the CMP's own default is
denied, not silentlygranted
A practical habit: once the setup looks right, run steps 1 to 4 again after every change to the CMP, the tag manager or the theme. It takes a few minutes and covers both paths, which is more than Consent Mode can tell you about itself.
This article first appeared on the Bannerproof blog. Bannerproof runs the clean-state and Reject tests automatically, non-Google trackers included: you can scan a site for free at bannerproof.app.
Written with AI assistance.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.