How to test and check Google Consent Mode v2

Google Consent Mode v2 passes your visitors’ consent choices to Google tags such as Google Analytics 4, Google Ads and Floodlight. Whether it works is not visible on the page itself. This guide shows five ways to check it, from the official Tag Assistant to a quick look in the browser console, and lists the most common problems.

Short answer: open Google Tag Assistant, connect your website and select the first event in the list. In the Consent tab, the table must show an On-page Default for ad_storage, analytics_storage, ad_user_data and ad_personalization. After you click a button in your cookie banner, the newest event must show an On-page Update with the values that match your choice.

What a working setup looks like

  • A default consent state is set before any Google tag sends data.
  • The default covers all four types that Consent Mode v2 uses: ad_storage, analytics_storage, ad_user_data and ad_personalization.
  • After the visitor’s choice, an update follows with the new values.
  • On later page views, the default is set again and the stored choice is sent as an update right after it.
  • The requests to Google carry the gcs and gcd parameters, and their values match the current state.

Before each test, start like a first-time visitor: delete your site’s cookies in the browser or use a private window. Otherwise the banner remembers your last choice and you only see the update.

1. Google Tag Assistant (the official way)

Tag Assistant is Google’s own debugging tool and shows the consent state for every event. If it disagrees with one of the other methods below, trust Tag Assistant.

  1. Open tagassistant.google.com, click Add domain, enter your website’s URL and click Connect. Your site opens in a new window in debug mode. Installing the Tag Assistant browser extension first makes the connection more reliable.
  2. In Tag Assistant, select the first event in the list on the left (often Consent Default or Consent Initialization) and open the Consent tab.
  3. Check the On-page Default column. Every type needs a value, Granted or Denied. A dash for ad_user_data or ad_personalization means the two types added in v2 are missing.
  4. Switch to your website window and click a button in the cookie banner, for example Allow all.
  5. Back in Tag Assistant, select the newest event. The On-page Update column now shows the values after your choice.
Tag Assistant, Consent tab of the Consent Default event: ad_storage and analytics_storage denied by default, ad_user_data and ad_personalization granted
First page view: default values before the visitor has chosen.
Tag Assistant, Event Consent State table: the On-page Update column shows granted for all types after the visitor accepted
After "Allow all": the update grants the types that were denied by default.

If you use Google Tag Manager, Tag Assistant also lists the tags that fired on each event. This shows whether your tags wait for consent. Google’s guide: Debug consent mode with Tag Assistant.

2. Network requests: the gcs and gcd parameters

Every request a Google tag sends contains the current consent state. You can read it in your browser’s developer tools without any extension.

  1. Open the developer tools (F12) and go to the Network tab.
  2. Type collect into the filter to see the Google Analytics 4 requests (they go to …/g/collect). For Google Ads, filter by gcs.
  3. Reload the page, click a request and open the Payload tab.
  4. Find the gcs and gcd parameters.
Payload of a Google Analytics 4 request in the browser's developer tools with the parameters gcs=G111 and gcd=13r3r3r2r5
A Google Analytics 4 request after the visitor accepted: gcs=G111, gcd=13r3r3r2r5.

gcs: the current state of ad_storage and analytics_storage

gcs starts with G1, followed by one digit for ad_storage and one for analytics_storage. 1 means granted, 0 means denied.

gcsad_storageanalytics_storage
G100denieddenied
G110granteddenied
G101deniedgranted
G111grantedgranted

gcd: default and update of all four types

gcd is longer and also covers ad_user_data and ad_personalization. The letters at positions 3, 5, 7 and 9 stand for ad_storage, analytics_storage, ad_user_data and ad_personalization, in that order. Each letter combines the default and the update:

LetterMeaning
lnot set
pdenied by default, no update
qdenied by default, denied by the update
tgranted by default, no update
rdenied by default, granted by the update
mno default, denied by the update
nno default, granted by the update
ugranted by default, denied by the update
vgranted by default, granted by the update

In the screenshot above, gcd=13r3r3r2r5 means: all four types were denied by default and granted after the visitor’s choice. That matches gcs=G111. An l for ad_user_data or ad_personalization means these types are not set at all.

Google does not document these parameters officially. The table follows the community’s reading of them (see the sources at the end). To decode a request automatically, you can paste it into consentcheck.analytics-debugger.com (not a Google tool).

3. Browser console: google_tag_data.ics.entries

Google tags keep the consent state in a JavaScript object. Open the console (F12, Console tab) and run:

google_tag_data.ics.entries

You get one entry per consent type. default is the default value and update the value after the choice: true means granted, false denied, undefined not set. If google_tag_data is undefined, no Google tag has loaded on the page yet.

Browser console output of google_tag_data.ics.entries: ad_personalization with default false and update true
ad_personalization: denied by default (false), granted by the update (true).

4. dataLayer: check the order

The order of the consent commands matters as much as their values. Run this in the console:

dataLayer

Look for the entries that start with consent. The consent, default entry must come before the first Google tag runs, that is before gtm.js if you use Google Tag Manager, or before the config command if you use gtag.js. The consent, update entry follows after the click in the banner, or right after the default on later page views.

dataLayer entries in the browser console with the consent default and consent update commands
dataLayer: the consent default (1) and update (2) come before gtm.js (9).

To follow the dataLayer while you click through the site, the browser extension dataLayer Inspector+ is useful.

5. Status in Google Analytics and Google Ads

Google Analytics 4 and Google Ads show whether they receive consent signals, but only after some days of data. In Google Analytics 4, look in the settings of your web data stream (Admin, Data streams, your stream, consent settings). In Google Ads, the diagnostics of your conversions show a consent mode status. Menu names change from time to time. Use this check to confirm a working setup, not to debug one.

Common problems

The default comes too late

If a Google tag runs before the default is set, its first request has no consent information. In Tag Assistant, tags fire on an event that comes before Consent Default; in the dataLayer, gtm.js or config comes before consent, default. Set the default as early as possible in the page, before the Google tag or Tag Manager snippet.

ad_user_data and ad_personalization are missing

Setups from before Consent Mode v2 often only set ad_storage and analytics_storage. Tag Assistant then shows a dash for the two newer types, and gcd shows an l for them. Google uses these two types for advertising features such as remarketing audiences, so add them to the default and the update.

No update after the click

If the default is there but nothing changes after the click, the banner is not connected to Consent Mode, or a JavaScript error stops it. Check the console for errors. Caching and optimization plugins that combine or delay scripts are a frequent cause; see problems with speed optimizer and caching plugins and how to exclude the banner from WP Rocket.

The test shows your old choice

The banner stores the visitor’s choice in a cookie. If you tested before, you see an update right after the default, and the banner does not appear. Delete the cookies of your site or use a private window.

No Google requests at all

Ad blockers and some browser privacy features block requests to Google. Turn them off for the test, or use a separate browser profile without extensions.

Checklist before going live

  • The first event has a default for ad_storage, analytics_storage, ad_user_data and ad_personalization.
  • The default comes before the first Google tag.
  • Accepting sends an update that grants the matching types.
  • Denying keeps the types denied.
  • On the next page view, the stored choice is sent as an update right after the default.
  • gcs in the Google Analytics 4 requests matches the choice.
  • Tested logged out, with your caching plugin active.

Consent Mode can break later, for example after a plugin update or a theme change. An automated daily check helps: see Cookie banner test and monitor.

Beautiful Cookie Banner is a free WordPress cookie banner plugin. Google Consent Mode v2 is part of the Premium add-on: for each consent type you choose which banner category grants it, and the add-on sends the default and the update to your Google tags. It loads its Consent Mode script with a very early priority, so the default comes before tags that are added through WordPress. Tags that are hard-coded at the top of a theme’s header.php can still run earlier; move them into Google Tag Manager or load them through WordPress.

Sources