Purpose-built for Google Consent Mode v2

CookieHug for
Google Consent Mode v2

A dedicated setup experience: one snippet, automatic gtag default/update, EEA-aware regional defaults, and category-to-signal mapping across the four GCM v2 signals. Configure GA4, Google Ads and GTM in 4 steps and verify everything in Tag Assistant.

Why CookieHug for Google

CookieHug is engineered to meet the Google CMP Partner Programme requirements — from banner to Consent Mode v2 signals.

Consent Mode v2 advanced

We emit gtag('consent','default',…) before any Google tag loads — with wait_for_update: 2000 ms, denied for the EEA, granted for ROW. On consent we fire consent_update mapped from your categories.

Regional defaults, pre-wired

Region detected from Cloudflare headers (CF-IPCountry, CF-Region-Code). Lookup: exact match (e.g. US-CA) → parent region (US) → ROW fallback. Built-in presets for EEA / GB / CH / US-CA / ROW.

Google-compliant banner

Google CMP-compliant template with inline link to business.safety.google/privacy, equal-prominence Accept / Reject buttons and no pre-checked toggles. One switch in the dashboard turns it on.

Google CMP Partner ready

Full mapping documented: configurable UI, banner template and in-UI recommendation — all publicly described and ready to show Google during the certification process.

What CookieHug does for you automatically

You paste one snippet — everything else happens inside the SDK, with no manual gtag in your code.

Consent default before Google tags

The SDK emits gtag('consent','default',…) before GTM / gtag.js loads, so Google tags start in denied (advanced mode).

Consent update on user decision

After Accept / Reject / Save preferences we fire gtag('consent','update',…) setting ad_storage, ad_user_data, ad_personalization, analytics_storage based on the chosen categories.

Category → GCM signal mapping

Full preset: marketing → all 3 ad signals, statistics → analytics_storage. Measurement preset: analytics_storage only. Everything configurable in the GUI, no code.

url_passthrough and redacted pings

We enable url_passthrough to preserve gclid / dclid for Google Ads and allow modeled conversions in denied state (cookieless pings).

GPC (Global Privacy Control)

We detect navigator.globalPrivacyControl === true and — in auto_deny_toaster mode — auto-send denied to Google without showing the banner, with an override option.

Client diagnostics

Debug mode logs every consent event and category-to-signal mapping to the console. You can review ingest on the Analytics tab in the dashboard.

Setup in 4 steps

CookieHug handles the client-side part; you configure three Google surfaces. ~15 minutes total.

1
Step 1

Install the CookieHug snippet

In the CookieHug dashboard open your domain → Get script. Paste the generated <script> as the first tag in <head> — before GTM, before gtag.js, before any Google code.

  • The CookieHug snippet must load *before* any Google code, otherwise Google tags will fire before consent default reaches them.
  • Do not add your own gtag('consent','default',…) call — CookieHug does that automatically; a second call would overwrite regional defaults.
  • Turn on Google CMP Certification in the Google Consent Mode tab so the banner meets Google's banner requirements (business.safety.google/privacy link, equal Accept/Reject).
2
Step 2

GA4 — Consent Mode on the property

Open the GA4 property → Admin → Data collection and modification → Data collection.

  • In the Consent Mode card confirm Consent Mode is enabled. *Advanced* mode is determined at tag level — CookieHug ensures ad_storage and analytics_storage are denied before the tag fires.
  • Leave Google signals and Ads personalization signals per your consent policy — CookieHug maps them from the Marketing category.
  • 24–48h after the first banner acceptances, check Admin → Property settings → Consent Mode diagnostics. It should report advanced mode and a healthy consent_update to consent_default ratio.
3
Step 3

Google Ads — Consent settings

In Google Ads → Tools → Data manager → Consent settings (or Admin → Consent in the new UI) enable Consent Mode for the account.

  • For each conversion action Google will apply behavioural modelling once the dataset threshold is reached (typically 1000+ ad clicks in 7 days per country). Until then diagnostics may say „Consent Mode not fully active” — that's a Google-side dataset gate, not a CookieHug misconfiguration.
  • Verify in Tools → Conversions → Diagnostics. The redacted_data and consent_default / consent_update ping counters should be > 0.
4
Step 4

Google Tag Manager — Consent settings per tag

Load your tags (GA4, Ads, Floodlight, …) in GTM normally — they will read the consent state CookieHug already pushed to dataLayer.

  • Do not add a „Consent Initialization — All Pages” tag with its own gtag('consent','default',…). CookieHug sets defaults before GTM loads; a second call would overwrite regional defaults and break EEA gating.
  • For each tag, in Advanced settings → Consent settings, add the required consent types (e.g. ad_storage, analytics_storage). GTM will block the tag's cookie/pixel write when the signal is denied and run it redacted under advanced mode.
  • If you use Google tag (gtag.js) directly, no GTM — no extra configuration needed. The CookieHug snippet runs before the gtag loader.

End-to-end verification

Three independent sources of proof that Consent Mode v2 is running in advanced mode.

Google Tag Assistant

Install Tag Assistant (Chrome extension), load your domain in a fresh profile. In the Summary tab you should see two consent events: default (before acceptance) with analytics_storage=denied / ad_storage=denied, and update (after acceptance) with the signals flipped to granted per your mapping.

GA4 DebugView

GA4 → Admin → DebugView. With ?gtm_debug=1 or GTM Preview mode you'll see consent state attached to each event and live consent_state reads.

Google Ads Diagnostics

Google Ads → Tools → Conversions → Diagnostics. Within 24h the Consent Mode status chip should turn green and consent_default / consent_update counters should grow with traffic.

DevTools Network

Open DevTools → Network → filter google. Before acceptance GA/Ads tags should fire with consent denied; after clicking accept you should see gtag('consent','update') flip the 4 signals per your category mapping.

Google CMP requirements → CookieHug features

Mapping of Google CMP Partner Programme requirements to concrete CookieHug features.

Google requirementHow CookieHug satisfies it
Banner fully configurable from a GUIFull admin panel: banner texts, layout (position, radius, alignment, Google Font, icon), colors (bg, heading, description, links, buttons), categories (enable/disable, labels, cookie inventory), Consent Mode v2 (Ads/GA4 toggles, 4 signals, regional defaults, mapping). Zero code required.
Banner template meeting Google's banner requirementsThe Domain → Google Consent Mode → Google CMP Certification switch enables a template that: (a) describes the purpose of data collection in an editable field, (b) renders an inline link to business.safety.google/privacy (target=_blank, rel=noopener), (c) offers an explicit opt-in via Accept All — all signals start denied, Reject All is equally prominent.
In-UI recommendation to use the templateWhen a client enables Consent Mode v2 (Ads / GA4 toggle) without the template, the admin panel surfaces an inline alert with a one-click Enable template button and a link to the Consent Mode v2 advanced docs. The alert disappears once the template is on.
Public Google setup landing pageThis page (cookiehug.com/features/google-consent-mode-v2) — publicly accessible, no login required, dedicated to Google configuration. Includes 4-step setup, Tag Assistant verification, regional defaults and Google-specific FAQ.
Proof-of-consentEvery user decision is stored in the cookiehug_consent_v2 cookie (regionId, method, timestamp, signals) and ingested into the consent log in the dashboard — CSV export available.

Regional defaults

Pre-configured GCM v2 signal presets based on regulatory requirements. Any cell can be overridden per domain in the dashboard.

Regionad_storagead_user_dataad_personalizationanalytics_storage
EEA (EU)denieddenieddenieddenied
GBdenieddenieddenieddenied
CHdenieddenieddenieddenied
US-CAdenieddenieddeniedgranted
ROW (rest of world)grantedgrantedgrantedgranted

Region detected from CF-IPCountry / CF-Region-Code (Cloudflare). Lookup order: exact match (e.g. US-CA) → parent region (US) → ROW fallback → global defaults.

Google FAQ

Ready for Consent Mode v2 without touching code?

Create an account, add a domain, paste one snippet. Google CMP-compliant banner, regional defaults and Tag Assistant verification — out of the box.

Language: English