Consent Mode v2
Google Consent Mode v2 with CMP bridges, default-deny, and edge-enforced identifier stripping.
Google requires Consent Mode v2 for EU/EEA traffic: tags must know whether the visitor
granted ad_storage, ad_user_data, ad_personalization and analytics_storage
before they fire. PixelFox implements the full flow, and it is off by default: a
store with no consent banner keeps exactly the behavior it has today.
Enable it
Add one attribute to the tag:
<script src="..." data-signals-key="..." data-signals-consent-default="denied" defer></script>deniedseeds a default-deny for all four signals before any tag loads (the EU setup). Google tags still send cookieless pings, which powers Google's conversion modeling.grantedactivates consent mode with everything allowed until a CMP says otherwise.
The same option exists in code: signals.init({ consentDefault: "denied" }).
Tell PixelFox what the visitor chose
If you use Cookiebot or OneTrust, nothing to do: their decisions are bridged
automatically (marketing categories map to the ad signals, statistics/performance to
analytics_storage).
Any other banner calls one function:
// everything at once
signals.updateConsent("granted");
// or per signal
signals.updateConsent({ ad_storage: "denied", analytics_storage: "granted" });The choice is persisted, replayed on the next page view, and forwarded to
gtag('consent','update',...).
What changes under denied consent
- Google tags (gtag, GTM) load normally and honor the signals themselves.
- Meta and TikTok pixels are not loaded until
ad_storageis granted; a grant from the banner injects them immediately, no reload needed. - Server-side: every event from a denied session is stamped, and the ingest edge strips identifiers (email, phone, click ids, fbp/fbc, IP) the same way offline mode does. This is enforced at the edge, not in the browser, so a misconfigured page cannot leak.
Verify
With the banner in its denied state, events still appear in your dashboard (counts and funnels keep working) but carry no identifiers, and Events Manager receives nothing from the pixel. After granting, the pixel loads and the next conversion carries the full match keys.