See the consent banner in action
Click Accept, Reject, or pick categories and watch in real time how the Google Consent Mode v2 state changes and which events fire to the dataLayer.
This is a safe demo. It loads no real GA4, Google Ads, Meta, TikTok, or Hotjar scripts and sends no data. The consent state lives only locally under the key cookiepilot_demo_consent and has no effect on your consent on cookiepilot.io.
Initial state — before you decide, every optional category sits at “denied”.
This website uses cookies
We use cookies to give you the best possible experience on our website.
Consent state
No decision yet- necessarygranted
- analyticsdenied
- marketingdenied
- preferencesdenied
Google Consent Mode v2 state
These are the signals CookiePilot passes to gtag() after your decision. By default everything is “denied” (with wait_for_update), except security_storage.
- analytics_storagedenied
- ad_storagedenied
- ad_user_datadenied
- ad_personalizationdenied
- functionality_storagedenied
- personalization_storagedenied
- security_storagegranted
CookiePilot → Consent Mode mapping
| CookiePilot category | Consent Mode fields |
|---|---|
| analytics | analytics_storage |
| marketing | ad_storage, ad_user_data, ad_personalization |
| preferences | functionality_storage, personalization_storage |
| necessary | security_storage: granted |
dataLayer log
Every consent change pushes a cookiepilot_consent_update event to the dataLayer with the current state.
Interact with the banner above to see the events.
The real widget also emits a native cookiepilot:consent event on the window object with the same payload.
Tracker simulation: before and after consent
An illustration of how popular tags behave under the current consent state. This is a simulation — none of these scripts are actually loaded here.
| Tracker | Category | Before consent | After consent | Expected behavior |
|---|---|---|---|---|
| GA4 | analytics | Consent Mode: denied | Consent Mode: granted | Storage is enabled only after analytics consent; with denied, cookieless pings are possible. |
| Google Ads | marketing | Consent Mode: denied | Consent Mode: granted | ad_storage / ad_user_data / ad_personalization are enabled after marketing consent. |
| Meta Pixel | marketing | does not fire | fires | Requires the cookiepilot_consent_update trigger + marketing condition (or auto-blocking). |
| TikTok Pixel | marketing | does not fire | fires | Requires the cookiepilot_consent_update trigger + marketing condition (or auto-blocking). |
| Hotjar | analytics | does not fire | fires | Requires the cookiepilot_consent_update trigger + analytics condition (or auto-blocking). |
Google tags (GA4, Google Ads) are governed by Consent Mode. When set to “denied”, Google may — depending on configuration — send so-called cookieless pings without writing cookies.
Non-Google tags (Meta, TikTok, Hotjar) should only fire after the cookiepilot_consent_update event once the category condition is met — or via auto-blocking, if it is enabled. In the default domain configuration auto-blocking is off, so a trigger-based setup is used.
Check your own implementation
Once you roll out CookiePilot on your site, run through the testing checklist in the docs to confirm your tags wait for consent.
Post-deployment testing checklist →