Skip to main content
Back to Guides
Compliance6 min readBy Armin Zaribaf

Meta Pixel Consent Mode with CookieBeam: How the Bridge Signals Consent

CookieBeam's Meta bridge calls fbq('consent', 'grant') or fbq('consent', 'revoke') the moment your visitor decides. Here's what fires, what's withheld, and how to verify it.

Meta Pixel Consent Mode: What CookieBeam Actually Sends

Meta Pixel consent mode is Meta's built-in mechanism for gating the browser-side Pixel behind a visitor's cookie consent choice. The Pixel exposes exactly one consent API: fbq('consent', 'grant') to allow full tracking, and fbq('consent', 'revoke') to stop it. When revoked, the Pixel stops setting its _fbp and _fbc cookies and stops sending event data to Meta's servers. When granted, it operates normally. CookieBeam's Meta bridge automates this: it listens for cookiebeam:consentUpdate and cookiebeam:consentRestored events, reads the resolved consent mode state, and calls fbq('consent', ...) based on whether any of ad_storage, ad_user_data, or ad_personalization is granted. All three map from your banner's marketing category. If the Pixel script hasn't loaded when the consent decision fires, the bridge queues the signal and flushes it once fbq becomes available, so no consent decision is lost to a loading race.

TL;DR

CookieBeam listens for cookiebeam:consentUpdate (consent changes) and cookiebeam:consentRestored (returning visitors). If any of ad_storage, ad_user_data, or ad_personalization is granted (all three map from your banner's marketing category), the bridge calls fbq('consent', 'grant'). Otherwise it calls fbq('consent', 'revoke'). No configuration needed beyond enabling the Meta vendor bridge in your banner settings.

How Meta's Own Consent Mechanism Works

Meta's Pixel exposes a two-command consent API. fbq('consent', 'revoke') suspends the Pixel: no _fbp or _fbc cookies, no events sent to Meta. fbq('consent', 'grant') resumes normal operation. This is separate from Limited Data Use (LDU), which controls server-side data processing for US state privacy laws via fbq('dataProcessingOptions', [...]). The consent command controls whether the Pixel collects at all; LDU controls what Meta does with data it already has. See Meta's GDPR implementation guide.

How CookieBeam Maps Categories to Meta's Signal

CookieBeam's consent mode resolves your banner categories into Google Consent Mode v2 keys. The Meta bridge then reads those keys and derives the signal. The marketing banner category maps to three keys: ad_storage, ad_user_data, and ad_personalization. If any one of them is granted, the bridge treats the Meta signal as granted. In practice, all three are granted or denied together when a visitor accepts or rejects marketing, so the OR logic rarely matters. But if you've configured a regional rule that grants only some ad keys, the Pixel will still receive grant.

Banner Category to Meta Pixel Signal
Banner CategoryConsent Mode v2 KeysMeta Pixel Signal
Marketing (accepted)ad_storage, ad_user_data, ad_personalization = grantedfbq('consent', 'grant')
Marketing (rejected)ad_storage, ad_user_data, ad_personalization = deniedfbq('consent', 'revoke')
Analyticsanalytics_storageNot used by Meta bridge
Preferencespersonalization_storageNot used by Meta bridge
Necessarysecurity_storage (always granted)Not relevant

Behavior at Each Stage

Before consent (first visit, banner untouched): The bridge hasn't fired any signal yet. If you've tagged the Pixel script as marketing in CookieBeam, it's blocked entirely until the visitor accepts. If the Pixel loads independently (e.g., via GTM's advanced consent mode), it runs in its default active state until the bridge fires.

Visitor accepts marketing: CookieBeam dispatches cookiebeam:consentUpdate with ad_storage: 'granted'. The bridge calls fbq('consent', 'grant'). The Pixel sets _fbp and begins sending events.

Visitor rejects marketing: The bridge calls fbq('consent', 'revoke'). No cookies, no events.

Returning visitor: On later page views, the runtime re-announces the stored explicit choice as cookiebeam:consentRestored, and the bridge re-applies grant or revoke without the banner reappearing. A consent change on the current page fires cookiebeam:consentUpdate. This restatement ships with the runtime release that includes the vendor bridge fix. Machine-written defaults (such as US opt-out auto-grants) are not restated.

Consent withdrawal: Revoking marketing in the preferences panel fires fbq('consent', 'revoke') immediately on the same page view.

The Queue: When the Pixel Loads After CookieBeam

If fbq isn't available when the consent event fires, the bridge queues the command and polls every 200ms until the Pixel loads, up to 50 attempts (10 seconds). This covers the common case where the Pixel script is tagged as marketing and loads only after acceptance. In practice, the Pixel loads well within that window.

What the Bridge Does Not Do

Two things to be clear about. First, the bridge does not send Meta's Limited Data Use (LDU) signal. LDU is a separate API (fbq('dataProcessingOptions', ['LDU'], 0, 0)) that tells Meta to restrict data processing under US state privacy laws like the CCPA. If your US visitors need LDU enforcement, you'll need to configure that separately. The bridge handles GDPR-style consent (should the Pixel collect data at all), not US-style processing restrictions (what should Meta do with data it already has).

Second, the bridge does not manage the Meta Conversions API (CAPI). CAPI runs server-side, outside the browser, so your server-side setup needs its own consent gating.

How to Verify in Your Browser

1

Clear cookies and open DevTools

Open DevTools (F12), go to the Application tab, and clear all cookies for your site. Open the Console tab. Reload the page.

2

Check the pre-consent state

With the banner visible and untouched, check the Application tab for _fbp and _fbc cookies. If the Pixel is tagged as marketing in CookieBeam, neither the Pixel nor these cookies should be present. If the Pixel loaded without blocking (e.g., hard-coded or via GTM advanced mode), _fbp may already be set because the bridge does not fire until the visitor interacts with the banner.

3

Accept marketing and check again

Accept all cookies (or just the marketing category). In the Network tab, you should see requests to facebook.com/tr/ appear. Check Application: _fbp should now be set. You can also type fbq.getState() in the Console to inspect the Pixel's internal state.

4

Withdraw consent and verify revocation

Open your cookie preferences and deselect marketing. The bridge fires fbq('consent', 'revoke'). Confirm no new /tr/ requests fire after this. The _fbp cookie may persist until it expires, but the Pixel won't read or send it.

5

Test returning visitor behavior

Close and reopen the tab without clearing cookies. Check that _fbp is present and /tr/ requests resume if you previously accepted, or that no events fire if you rejected.

Common Mistakes

Relying on the bridge alone without script blocking. The bridge only fires after the visitor interacts with the banner. If the Meta Pixel is hard-coded in your <head> without being tagged as marketing, it tracks every visitor from page load onward, before the bridge has a chance to send revoke. Tag the Pixel script as marketing (type='text/plain' data-category='marketing') so CookieBeam blocks it until consent. The bridge then confirms the signal once the Pixel loads.

Confusing consent with Limited Data Use. fbq('consent', 'revoke') stops collection entirely. fbq('dataProcessingOptions', ['LDU'], 0, 0) allows collection but restricts processing. Different regulations, different API calls.

Expecting modeled conversions. Meta does not model conversions from denied-consent visitors (unlike Google's Advanced Consent Mode). Your reported conversions will drop by your rejection rate. See improving consent rates without dark patterns.

Frequently Asked Questions

Does the Meta Pixel still track before consent is given?

It depends on how the Pixel is loaded. If you've tagged the Pixel script as marketing in CookieBeam, it's blocked from loading entirely until the visitor accepts. If the Pixel loads without blocking (hard-coded or via GTM), it will track from page load because the bridge only fires after the visitor interacts with the banner. To prevent pre-consent tracking, always tag the Pixel script as marketing so CookieBeam blocks it.

What is the difference between fbq consent revoke and Meta Limited Data Use?

fbq('consent', 'revoke') stops the Pixel from collecting any data. Limited Data Use (LDU) lets the Pixel collect data but restricts how Meta processes it server-side. The CookieBeam bridge sends the consent signal. It does not send LDU flags.

Does CookieBeam handle Meta Conversions API consent?

No. The Conversions API (CAPI) runs server-side, outside the browser. The bridge only controls the browser-side Pixel via fbq('consent'). Your server-side CAPI setup needs its own consent enforcement. See Meta Pixel and Conversions API: consent gating done right.

Will my Meta Ads conversions drop after enabling consent mode?

Yes, for visitors who reject marketing cookies. Meta does not model the conversions it can't observe (unlike Google's Advanced Consent Mode). The conversion drop you see is your real consent rate, not a measurement error. For context on the numbers, see Facebook Ads after consent.

How do I test that the Meta Pixel respects consent denial?

Clear cookies, load your site, and leave the banner untouched or reject marketing. Open DevTools and check that no _fbp cookie is set and no network requests go to facebook.com/tr/. Then accept marketing and confirm both appear. Repeat after a page reload to test the returning-visitor path.

Does the bridge work if the Pixel loads before CookieBeam?

Yes. If fbq is already available when the consent event fires, the bridge calls it immediately. If fbq loads later, the bridge queues the command and polls every 200ms until the Pixel becomes available, up to 10 seconds. In either order, the signal arrives.

Next Steps

The Meta bridge is one of eight vendor consent bridges CookieBeam supports. For the broader picture, see the vendor bridge overview and Meta Pixel and Conversions API consent gating.

Meta Pixel Consent Mode with CookieBeam | CookieBeam