Docs menu
Google services setup
Google-side configuration for Consent Mode v2: GA4, Google Ads, GTM and end-to-end verification with CookieHug.
Google CMP Partner — banner requirements (Sprint 5)
CookieHug is designed to meet Google's CMP Partner programme banner requirements. This section maps each Google requirement to the feature that satisfies it, so clients applying for certification can point to a concrete implementation. Reference: Google's Consent Mode v2 advanced guide — developers.google.com/tag-platform/security/guides/consent?consentmode=advanced.
Requirement 1 — Banner fully configurable from a GUI
The entire banner is configured without touching code. The admin panel (Domain detail) exposes every banner property through GUI controls — no field requires code, configuration files, or API calls.
| GUI tab / section | Controls |
|---|---|
| Banner texts | Heading, description, small text, accept/reject/accept-selected labels, categories link text |
| Layout | Position (left/right/bottom-center/center), border radius, text alignment, Google Font, optional cookie icon (emoji/SVG), categories button placement |
| Colors | Banner background, heading, description, link, small text, accept/reject/categories buttons (bg/text/hover/border) |
| Categories | Enable/disable the 4 categories, per-category labels and descriptions, cookie inventory |
| Google Consent Mode | Ads/GA4/outside-CMP toggles, 4 GCM v2 signal defaults, regional defaults (EEA/US-CA/ROW/custom), category→signal mapping, CMP-compliant template toggle |
| Consent policy | Consent model (opt-in / opt-out / notice-only), GPC / DNT handling, USP (US Privacy) adapter, post-consent view |
| Diagnostics | Debug Mode activation, ingestion of client-side diagnostics reports |
Requirement 2 — Banner template that meets Google's banner requirements
CookieHug ships a Google CMP–compliant template that clients enable with a single switch: Domain detail → Google Consent Mode → Certyfikacja Google CMP → toggle ON. When enabled, the banner satisfies all three sub-requirements:
(a) Purpose of data collection. The default description explains that cookies are used for personalization of content and traffic analytics. Clients can extend the text from the GUI — the field is free-form so product-specific purposes (e.g. "to measure ad performance via Google") can be added. Expandable category cards via the Dostosuj preferencje cookie link list the granular purposes per category.
(b) Link to https://business.safety.google/privacy. Rendered inline in the banner as an <a> directly below the description paragraph. Visible in the first banner view — users do not need to navigate away or open a different page. Uses target="_blank" rel="noopener noreferrer".
(c) Affirmative consent option. The banner always renders a dedicated Zaakceptuj wszystkie / Accept all button as an explicit, unchecked-by-default opt-in. All GCM v2 signals start as "denied" and only flip to "granted" after the user clicks accept — no pre-checked state, no implicit consent from scrolling, and the reject button has equal visual weight in every preset.
Requirement 3 — In-UI recommendation to use the template
When a client enables Google Consent Mode (via the Google Ads connected or Google Analytics 4 connected toggle) but has not yet turned on the CMP template, the admin UI surfaces an inline recommendation at the top of the Google Consent Mode section:
> Recommended: enable the Google CMP template > Consent Mode v2 is active but your banner does not include the required Google privacy link. Enable the CMP template so your banner meets Google CMP Partner requirements. > [Enable template] • [Google Consent Mode docs]
The recommendation includes a one-click enable button and a link to Google's Consent Mode advanced guide. It disappears automatically once the template is on. CookieHug does not support IAB TCF — this recommendation therefore applies to all Consent Mode deployments through the platform.
Google-side configuration — overview
CookieHug takes care of gtag('consent','default', …) and gtag('consent','update', …) automatically — the snippet you paste into <head> emits both. You still need to configure three things on the Google side so Consent Mode v2 advanced works end-to-end. Full reference: developers.google.com/tag-platform/security/guides/consent?consentmode=advanced.
Google-side step 1 — GA4 property
- Open the GA4 property → Admin → Data collection and modification → Data collection.
- In the Consent Mode card, confirm Consent Mode is enabled. There is no per-property "advanced" toggle — *advanced* is determined at tag level by whether
ad_storageandanalytics_storageare set todeniedbefore the tag fires (CookieHug does exactly that). - Leave Google signals and Ads personalization signals configured per your consent policy — they will honour the
ad_user_dataandad_personalizationsignals CookieHug maps from the Marketing category. - Wait 24–48 h after first banner acceptances, then open Admin → Property settings → Consent Mode diagnostics (Google's internal panel). It should report advanced mode detected and a healthy
consent_updatetoconsent_defaultratio.
Google-side step 2 — Google Ads
- In Google Ads → Tools → Data manager → Consent settings (or Admin → Consent on the new UI): enable Consent Mode for the account.
- For each conversion action, Google will start applying behavioural modelling once the account has enough consented traffic (typically 1000+ ad clicks in 7 days per country). Until the threshold is crossed, diagnostic banners may show "Consent Mode not fully active" — this is a Google-side dataset gate, not a CookieHug misconfiguration.
- Verify with Tools → Conversions → Diagnostics. The
redacted_dataandconsent_default/consent_updateping counts should both be > 0.
Google-side step 3 — Google Tag Manager
Important: do not add a "Consent Initialization — All Pages" tag that also calls gtag('consent','default', …). CookieHug's snippet runs *before* GTM loads (via <head> priority), so the defaults are already set. A second default call from GTM overwrites CookieHug's regional defaults and breaks EEA gating.
- In GTM, load tags (GA4, Ads, Floodlight, etc.) as normal — they will read the consent state CookieHug already pushed.
- For each tag that should respect Consent Mode, open Advanced Settings → Consent Settings and add the required consent types (e.g.
ad_storage,analytics_storage). GTM will then block the tag's cookie/pixel writes when the signal isdeniedand run it redacted under advanced mode. - If you use the Google tag (gtag.js) directly (no GTM), nothing extra is needed — CookieHug's snippet runs before the gtag loader.
Google-side step 4 — End-to-end verification
- Install Google Tag Assistant (Chrome extension) → enable → reload your domain in a fresh profile. In the Summary tab you should see two
consentevents: onedefault(before the banner is accepted) withanalytics_storage=denied/ad_storage=denied, and oneupdate(after accept) with the relevant signals flipped togranted. - Open GA4 → Admin → DebugView. With CookieHug's Debug Mode off on production, use a
?gtm_debug=1URL or enable Debug Mode in GTM Preview to see the live consent state on each event. - In the Google Ads Diagnostics tab, wait up to 24 h and confirm the Consent Mode status chip turns green.
How to verify the deployed banner
- Enable the template in the admin GUI.
- (Re)generate the domain script from the Get Script dialog — the new banner HTML takes effect on the next page load.
- Load the target domain and open the banner. You should see the heading, description, an inline link *Dowiedz się, jak Google chroni Twoje dane* pointing to
https://business.safety.google/privacy, and *Zaakceptuj wszystkie / Odrzuć wszystkie* buttons of equal prominence. - Open DevTools → Network → filter
google. Before acceptance, GA/Ads tags should fire with consentdenied; after clicking accept, you should seegtag('consent','update')flip the four signals tograntedper your category mapping.