Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

How to check if Google Consent Mode v2 is actually working (gcs and gcd explained)

A cookie banner can show "Reject" and still tell Google's tags "granted". The banner looks fine, the choice is saved, and nobody notices, because the only place the truth shows up is two query parameters on every Google

A cookie banner can show "Reject" and still tell Google's tags "granted".
The banner looks fine, the choice is saved, and nobody notices, because the
only place the truth shows up is two query parameters on every Google
measurement request: gcs and gcd.

Here is how to read them in about two minutes.

1. Catch a request before anyone clicks

Open the site in a private window, open DevTools (F12), go to the Network
tab, filter for "collect" and reload. Do not touch the banner.

Every request to Google Analytics carries a gcs parameter:

  • G100: ad and analytics storage denied
  • G111: both granted

Before the visitor has chosen anything, G111 should never appear. If it
does, the default in your consent setup says "granted".

2. Read gcd for the v2 signals

gcd starts with 13, then one letter per signal, in this order:
ad_storage, analytics_storage, ad_user_data, ad_personalization.

  • l: not set
  • p: denied
  • t: granted

An l on the last two positions means the two signals added with v2 are
missing. Google has required them for users in the EEA since March 2024 if
you use Google Ads for measurement, audiences or remarketing.

3. Click "Reject" and look again

Filter for "collect" again. gcs should stay G100, or in basic mode no
request is sent at all. No _ga cookie should appear.

The usual causes

  • The default in the banner's Tag Manager template is "granted", or the configured region does not include the visitor's country.
  • A second copy of the Google tag sits in the theme, a plugin or a shop app. It never got the default and sends with no consent state at all.
  • v2 is not switched on in the banner tool, or the Tag Manager template is outdated.

Fix order: default to "denied" for all four signals before any other Google
tag, switch on v2 in the banner tool, load each Google tag once (ideally
through Tag Manager), then measure again after "Reject".

Consent Mode only covers Google tags. Meta Pixel, TikTok and the rest have
to be held back by the banner tool itself.

If you would rather not do this by hand on every page: I built a scanner
that loads the page in a fresh browser, reads gcs and gcd on every Google
request, clicks "Reject" and measures again. Free check here:
https://konformia.at/en/guides/google-consent-mode-v2

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.