Cluster 15 · Analytics Compliance · gcs / gcd Signals

GA4 Consent Mode v2 Audit Checklist: Verify gcs, gcd, ads_data_redaction & Pings

Inspect Google Analytics 4 Consent Mode v2 runtime signals (`gcs`, `gcd`), cookieless ping behavior, and `ads_data_redaction` to confirm zero `_ga` cookies drop before opt-in.

100% Browser-Side · Zero User-Data Upload · Strict CSP

Compliance & Pre-Consent Control Specification

Control / Signal Compliant Baseline Engineering & Privacy Rationale
Zero Pre-Consent _ga 0 _ga* cookies before accept Verify `document.cookie` and DevTools Application tab show zero `_ga` or `_ga_<ID>` before consent
gcd / gcs Parameters Encoded denied flags on /g/collect Confirm `gcs=G100` (Basic/denied) or encoded `gcd` denied bitmask on initial GA4 collect requests
ads_data_redaction gtag('set', 'ads_data_redaction', true) Redacts `gclid` / `dclid` and disables ad cookies when `ad_storage` is denied
url_passthrough Optional (false for strict minimization) Only enable `url_passthrough` if cross-page click attribution without cookies is legally approved

GA4 + Consent Mode v2 Verification Script (DevTools Console)

verify-ga4-consent.js
// Paste in browser DevTools on a fresh Incognito load BEFORE clicking the cookie banner:
(() => {
  const gaCookies = document.cookie.split(";").filter((c) => /^\s*_ga/.test(c));
  const consentCmds = (window.dataLayer || []).filter((e) => e[0] === "consent");
  console.log({ preConsentGaCookies: gaCookies, consentCommands: consentCmds, gpc: navigator.globalPrivacyControl });
})();

GA4 Strict Pre-Consent Default + Update Wrapper

ga4-consent-bootstrap.html
<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
  });
  gtag('set', 'ads_data_redaction', true);
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>

Implementation Steps & Key Insights

  1. Open a clean Incognito window with zero prior cookies and visit your site without interacting with the consent banner.
  2. Check Application -> Cookies: confirm `_ga`, `_gid`, and `_ga_<CONTAINER>` are completely absent.
  3. Inspect `window.dataLayer` to verify `['consent', 'default', ...]` precedes the `['config', 'G-...']` command.
  4. Confirm clicking 'Accept All' fires `gtag('consent', 'update', ...)` and immediately updates `analytics_storage`.
  • Even in Google's Advanced Consent Mode (cookieless pings), some EU DPAs (including France's CNIL and Austria's DSB) restrict unconsented `analytics_storage` pings — Basic Consent Mode blocks GA4 tag execution completely until granted.
  • Always verify `_ga` does not appear via a forgotten second `gtag('config', ...)` embedded inside a legacy theme partial or WordPress plugin.
  • Run live headless checks on `consent.runglab.dev` to catch hidden pre-consent `_ga` cookies across routes.

Common Pre-Consent Pitfalls

  • Loading `gtag/js` cleanly in React/Next.js via `next/script` `afterInteractive` while `consent default` runs later in `useEffect`.
  • Running two separate GA4 measurement IDs where only one honors CMP consent state.
  • Leaving `url_passthrough: true` accidentally without checking data minimization terms.
Verify Live: Audit your production site on consent.runglab.dev or grab the $39 ConsentCheck Compliance Pack. Not legal advice.

More GDPR, Consent Mode v2 & GPC Implementation Guides

← Back to GDPR & Consent Mode v2 Hub · ConsentCheck Live Audit → · $39 Compliance Pack → · Cluster 4: Security Headers → · Cluster 11: PCI & SRI →

Frequently Asked Questions

What is the difference between Basic and Advanced Consent Mode in GA4?

Basic Consent Mode prevents Google tags from loading or sending any network hits until the user consents. Advanced Consent Mode loads `gtag.js` with defaults set to `'denied'` and sends cookieless telemetry pings for conversion modeling.

Why do I still see a `/g/collect` request when `analytics_storage` is `'denied'`?

In Advanced Consent Mode, GA4 sends cookieless pings carrying `gcs=G100` / `gcd=...` signals without setting `_ga` cookies. If your DPO requires zero network requests before consent, use Basic Consent Mode (block tag until consent).

How can I automate GA4 pre-consent cookie regression checks?

Run `consent.runglab.dev` live audits or grab the $39 ConsentCheck Compliance Pack (which includes a Playwright/CLI pre-consent drift checker).