✓ 100% independent
New Metrics

Knowledge base glossary

What is Facebook Consent Mode? A short definition

In Data Privacy Regulation2 minutes reading time

Facebook Consent Mode is the common name for the consent API in Meta’s (formerly Facebook) Meta Pixel. It lets websites hold back the pixel until a visitor has given consent, and release it once they do. Meta itself doesn’t use the name “Consent Mode”: its developer documentation describes the fbq('consent', ...) command on its GDPR implementation page.

The Meta pixel is a code snippet used to track user behavior on websites and apps for advertising and analytics purposes.

How does Meta Consent Mode work?

By adding one line to your Meta Pixel code you revoke consent by default, so the pixel doesn’t send data to Meta before the user has consented. When the user accepts, your consent banner (CMP) grants consent and the pixel starts sending. Meta’s documentation says you need to call revoke on every page.

Unlike Google Consent Mode, the Meta Pixel only knows two states:

  • Consent revoked: The pixel sends nothing to Meta. Meta documents only that revoking pauses sending. In practice, the current pixel script (fbevents.js) holds the fbq calls made while consent is revoked, including init and track, in a queue on the page. That is undocumented behaviour and Meta can change it.
  • Consent granted: The pixel works as normal. Calls that were queued on the current page are sent in order, followed by all new events. If the visitor leaves the page without consenting, the queued calls are lost.

There is no partial or “analytics only” state, and Meta’s documentation describes no equivalent of Google’s cookieless pings or conversion modelling for non-consented visitors. Meta’s Limited Data Use option is sometimes mixed up with consent, but it’s a separate setting for US state privacy laws (California, Texas and 12 other states), set with fbq('dataProcessingOptions', ['LDU'], 0, 0). It doesn’t replace consent under the GDPR.

Why should you use Meta Consent Mode?

  • Privacy Compliance: Like Google Consent Mode, Meta Consent Mode helps websites and apps follow privacy regulations by respecting user choices for data collection with the Meta Pixel.
  • Data Control: The pixel stays in your page as normal, but it only sends data once your CMP has granted consent.
  • No lost events on the consent page: Because calls are queued instead of dropped, the PageView and any events that happened before the visitor clicked “accept” on that page are still sent after consent. With a tag that only fires after consent, those early events are often missed.

Keep in mind that the consent command only controls the browser pixel. If you also send events through the Conversions API, you need to apply the same consent choice to those server events yourself.

Implementing Facebook Consent Mode

You can implement the Facebook Consent Mode with a few changes to the Facebook Pixel code or by using a CMP that supports it like Cookiescript. CookieScript lets you choose in its dashboard which cookie category (targeting by default) grants consent for the Meta Pixel. If you load the pixel through Google Tag Manager, CookieScript recommends the Initialization – All Pages trigger for the pixel tag. Other CMPs, such as CookieYes, document the same fbq('consent', 'revoke') setup.

Step 1: Find the Facebook Pixel Code located in the site header or in GTM.

!function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', '{your-pixel-id-goes-here}'); fbq('track', 'PageView');

Step 2: Add the following code before the init call in your Meta Pixel code.

fbq('consent','revoke');

Now, the code should be like this:

!function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('consent', 'revoke'); fbq('init', '{your-facebook-pixel-id}'); fbq('track', 'PageView');

Step 3: Use your CMP to revoke or grant consent after banner interaction

function handleConsent(hasConsent) { fbq("consent", hasConsent ? "grant" : "revoke"); }

On every following page, the revoke call runs again first. Your CMP then needs to call grant again for visitors who already consented, otherwise the pixel stays paused.

Overall, Meta Consent Mode is a simple and useful tool for websites that use the Meta Pixel and want their data collection to follow user consent.

It doesn’t recover data from visitors who decline, but it makes sure you don’t lose the events of visitors who accept.

Feel free to get in touch for any further questions.

Freek KampenIvo Taris

Need an answer for your own setup?

Questions about your tracking, GA4 or which tool fits? Ask Freek and Ivo, the analytics specialists behind New Metrics. You get a reply from one of us, not a bot.

Contact us