Cluster 15 · Ad Tech Gating · fbq('consent', 'revoke')
Meta Pixel Pre-Consent Gating Guide: fbq('consent', 'revoke') & _fbp Blocking
Stop Meta Pixel from setting `_fbp` cookies or firing `tr/` network beacons before user consent using `fbq('consent', 'revoke')` or strict GTM/script deferral.
100% Browser-Side · Zero User-Data Upload · Strict CSP
1. Site Profile, Consent Mode v2 & Tag Gates
GCM v2 + W3C GPC
Consent Signals & Marketing / Analytics Stacks
Informational Notice: Deterministic Consent Mode v2, cookie, and GPC configuration helper — not legal advice. Verify final privacy compliance with qualified GDPR/CCPA counsel.
Consent Mode v2 & GPC Configuration Score
100 / 100 (A+)
PASS
GCM-001: Google Consent Mode v2 default-denied active across all 4 signalsPASS
ad_storage, analytics_storage, ad_user_data, and ad_personalization default to 'denied' before tag firing.
GCM-002: wait_for_update tuned (500ms)PASS
Allows asynchronous CMP state restoration before tag dispatch.
GCM-003: ads_data_redaction enabledPASS
Redacts ad click parameters and prevents third-party ad cookies while ad_storage='denied'.
GCM-004: GPC Signal & /.well-known/gpc.json support enabledPASS
Verify Live Pre-Consent Cookies, Consent Mode v2 & GPC Readiness
Run a live pre-consent cookie, tracker, gtag('consent', 'default') & /.well-known/gpc.json audit on ConsentCheck (consent.runglab.dev), or grab the turnkey $39 ConsentCheck Compliance Pack on Creem. Need a PayPal invoice? Email [email protected].
Verify Live Pre-Consent Cookies, Consent Mode v2 & GPC Readiness
Run a live pre-consent cookie, tracker, gtag('consent', 'default') & /.well-known/gpc.json audit on ConsentCheck (consent.runglab.dev), or grab the turnkey $39 ConsentCheck Compliance Pack on Creem. Need a PayPal invoice? Email [email protected].
# Cookie & Consent Notice — Acme Commerce Ltd.
- **Primary Domain:** https://shop.acme.example.com
- **Privacy Contact / DPO:** [email protected]
- **Google Consent Mode v2 Default State:** `denied` across `ad_storage`, `ad_user_data`, `ad_personalization`, and `analytics_storage` prior to consent (eea-uk-strict).
- **Global Privacy Control (GPC):** Honored automatically via `Sec-GPC: 1` and `navigator.globalPrivacyControl` (published at `https://shop.acme.example.com/.well-known/gpc.json`).
- **Ads Data Redaction:** Enabled (`ads_data_redaction: true`).
## Active Storage Categories
- Strictly Necessary (Auth / CSRF / Security)
- Analytics & Product Telemetry (GA4 / PostHog)
- Advertising & Attribution (Google Ads / Meta Pixel)
## Pre-Consent Engineering Guarantees
1. Zero non-essential cookies or localStorage advertising IDs are written before explicit opt-in consent in EEA/UK/CH.
2. Reject-All requires the exact same click depth (1 click) as Accept-All.
3. Users can withdraw consent or trigger GPC opt-out at any time via footer preferences or browser `Sec-GPC: 1`.
> *Informational engineering template only — not legal advice. Verify final privacy disclosures with qualified GDPR/CCPA counsel.*
GDPR / ePrivacy vs. CCPA / CPRA GPC Matrix
Control
EU GDPR & ePrivacy
US CCPA / CPRA & GPC
Default Pre-Consent Model
Strict Opt-In (ePrivacy Art. 5(3) + GDPR Art. 6/7): block non-essential cookies & tags until affirmative consent.
Opt-Out Model (CPRA §1798.135): allow default load except sensitive data / minors; must stop sale/sharing on opt-out.
Google Consent Mode v2 Signals
All 4 signals (ad_storage, analytics_storage, ad_user_data, ad_personalization) MUST default to 'denied'.
Set ad_storage, ad_user_data & ad_personalization to 'denied' immediately when Sec-GPC: 1 or opt-out cookie present.
Global Privacy Control (GPC)
Recognized as supplementary signal; does not replace explicit affirmative consent banner in EU/UK.
Legally binding opt-out of sale/sharing signal (navigator.globalPrivacyControl / Sec-GPC: 1 + /.well-known/gpc.json).
Dark Patterns & Symmetry
CNIL / EDPB require 'Reject All' button with equal visual prominence & 1-click parity to 'Accept All'.
CPRA prohibits deceptive/asymmetrical opt-out UX or forcing multi-step confirmation hoops.
Cookie Retention Cap
CNIL / EU DPAs recommend <= 13 months max retention for consent/analytics cookies and 6-month preference re-prompt.
Honor opt-out preference for >= 12 months before asking to re-authorize.
ConsentCheck · Live Scan$39 Compliance Pack
Verify Live Pre-Consent Cookies, Consent Mode v2 & GPC Readiness
Run a live pre-consent cookie, tracker, gtag('consent', 'default') & /.well-known/gpc.json audit on ConsentCheck (consent.runglab.dev), or grab the turnkey $39 ConsentCheck Compliance Pack on Creem. Need a PayPal invoice? Email [email protected].
Must execute BEFORE `fbq('init', ...)` and `fbq('track', 'PageView')` — or defer loading fbevents.js
Blocked Cookie
_fbp / _fbc
Meta Pixel must not drop `_fbp` first-party cookies prior to marketing consent
Consent Grant
fbq('consent', 'grant')
Call inside your CMP marketing-opt-in handler, or dynamically inject `fbevents.js` on grant
GPC / CCPA
fbq('dataProcessingOptions', ['LDU'], 1, 1000)
Enable Limited Data Use (LDU) and suppress Pixel when `navigator.globalPrivacyControl === true`
Strict Pre-Consent Meta Pixel Gating (Zero Pre-Consent Requests)
meta-pixel-consent-gate.ts
let metaLoaded = false;
export function grantMarketingConsentForMeta(pixelId: string) {
if (typeof navigator !== "undefined" && navigator.globalPrivacyControl === true) return;
if (metaLoaded) {
window.fbq?.("consent", "grant");
return;
}
metaLoaded = true;
// Dynamically inject fbevents.js ONLY after explicit marketing consent:
const s = document.createElement("script");
s.async = true;
s.src = "https://connect.facebook.net/en_US/fbevents.js";
document.head.appendChild(s);
window.fbq?.("init", pixelId);
window.fbq?.("consent", "grant");
window.fbq?.("track", "PageView");
}
Meta Pixel In-Script Revoke + LDU Fallback
meta-revoke-ldu.js
// If Meta Pixel base stub is already queued, revoke BEFORE init + track:
window.fbq?.("consent", "revoke");
if (navigator.globalPrivacyControl === true) {
window.fbq?.("dataProcessingOptions", ["LDU"], 1, 1000);
}
Implementation Steps & Key Insights
Audit your page before clicking Accept: neither `connect.facebook.net/en_US/fbevents.js` nor `facebook.com/tr/` nor `_fbp` should appear.
Prefer dynamic script injection (only load `fbevents.js` when marketing consent is granted) for strict GDPR compliance.
If using Meta's inline queue stub, call `fbq('consent', 'revoke')` strictly before `fbq('init', ...)` and `fbq('track', 'PageView')`.
Check `navigator.globalPrivacyControl === true` before ever enabling Meta Pixel for US visitors.
Calling `fbq('consent', 'revoke')` AFTER `fbq('track', 'PageView')` still leaks the initial PageView beacon and user IP/User-Agent to Meta servers.
Removing the `<noscript><img src='https://www.facebook.com/tr?...'></noscript>` fallback pixel is essential — otherwise browsers with JS enabled/pre-fetched or non-JS scrapers leak hits unconsented.
Test live pre-consent `_fbp` cookies and third-party beacons via `consent.runglab.dev`.
Common Pre-Consent Pitfalls
Leaving `<noscript><img src='https://www.facebook.com/tr?...'>` active in `index.html`, bypassing JS consent gating.
Firing `fbq('init')` and `fbq('track', 'PageView')` in GTM on `Initialization - All Pages` without a Consent Check.
Ignoring `Sec-GPC: 1` / `navigator.globalPrivacyControl` on Meta Conversions API (CAPI) server relays.
Generate a strictly ordered Google Consent Mode v2 default-denied block covering ad_storage, analytics_storage, ad_user_data, and ad_personalization with ads_data_redaction and 500ms wait_for_update.
Publish a compliant /.well-known/gpc.json support resource and honor Sec-GPC: 1 HTTP headers plus navigator.globalPrivacyControl for CCPA/CPRA opt-out of sale/sharing.
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.
Configure GTM Consent Overview, Consent Initialization triggers, and custom HTML/pixel tag consent checks so zero marketing tags fire before Consent Mode v2 grants permission.
Prevent HubSpot (`hubspotutk`, `__hstc`) and Intercom (`intercom-id-*`) from dropping marketing or tracking cookies before user consent using `_hsq` suppression and conditional widget loading.
Is `fbq('consent', 'revoke')` enough for strict GDPR compliance?
When called BEFORE `init` and `track`, `fbq('consent', 'revoke')` stops Meta Pixel from firing tracking hits or setting `_fbp`. However, strict EU guidance often prefers not even downloading `fbevents.js` until consent is granted.
Should I remove the `<noscript>` `facebook.com/tr` `<img>` tag?
Yes — `<noscript>` image tags cannot obey JS consent state and represent an unconsented tracking vector.
How can I check if Meta Pixel fires before consent on my checkout?
Scan your live URL on https://consent.runglab.dev/?ref=tool-consent-cluster to inspect pre-consent cookies and network trackers.