Cookie consent
Meta Pixel and the GDPR: how to get consent right
By the Kiescy teamUpdated 6 min readChecked against the official text on
The Meta Pixel is the snippet that tells Facebook and Instagram who visited your site and what they did: viewed a product, added to cart, bought. It's what makes retargeting and conversion tracking work, and it's one of the trackers privacy regulators look at first.
This guide explains when the Pixel needs consent in Europe and the US, three ways to hold it back until visitors agree, what to do about the Conversions API, and how to check it's working.
The short version
In the EU and UK, yes: the Meta Pixel sets advertising cookies and sends visitor data to Meta, so it needs opt-in consent before it loads. In California and other US states with privacy laws, you usually don't need consent first, but sharing data for cross-context ads gives visitors the right to opt out, so you need a "Do Not Sell or Share" choice. Hold the Pixel back with a consent banner, or use Meta's fbq('consent', 'revoke') and fbq('consent', 'grant') calls.
Words you'll see in this guide (4)
- Meta Pixel:
- Meta's tracking code (formerly the Facebook Pixel). It loads from connect.facebook.net and reports page views and events to Meta.
- _fbp and _fbc:
- Cookies the Pixel uses on your domain. _fbp holds a browser ID; _fbc holds the click ID from a Facebook or Instagram ad.
- Conversions API (CAPI):
- A way to send the same events from your server to Meta instead of, or as well as, the browser.
- Joint controller:
- When two organisations decide together why and how personal data is collected. The EU's top court said a site with a Facebook plugin can be one, together with Meta.
On this page
Does the Meta Pixel need consent?
| Where your visitors are | Rule | What you need |
|---|---|---|
| EU and EEA | ePrivacy Article 5(3) for the cookies, the GDPR for the data sent to Meta | Opt-in consent before the Pixel loads |
| United Kingdom | PECR and the UK GDPR | Opt-in consent before the Pixel loads |
| California | CCPA: sharing personal information for cross-context behavioural advertising | A "Do Not Sell or Share My Personal Information" link, and honour Global Privacy Control |
| Other US states with privacy laws | Opt-out of targeted advertising | An opt-out, often with Global Privacy Control |
| India | DPDP Act: consent for processing not covered by a legitimate use | Opt-in consent for ad tracking |
The EU case is also about responsibility. In Fashion ID (C-40/17, 2019), the Court of Justice of the EU ruled that a website that embeds a Facebook plugin is a joint controller with Facebook for collecting and sending visitors' data. In plain words: if the Pixel is on your site, you share responsibility for what it collects, and you're the one who has to ask the visitor first.
Example
A Lisbon shoe store runs Instagram ads with the Pixel on every page. A visitor from Madrid opens a product page. Without consent handling, the Pixel has already sent a PageView and a ViewContent event to Meta and set the _fbp cookie before the visitor has seen the banner. With the Pixel held back, nothing reaches Meta unless the visitor accepts advertising cookies.
3 ways to make the Pixel wait for consent
1. Let your consent banner block it (easiest)
A banner that blocks scripts by category can hold the Pixel back without any code changes. Kiescy does this automatically: connect.facebook.net and facebook.com are in its advertising category by default, so the Pixel's script doesn't run until the visitor allows advertising, then loads normally. If you installed the Pixel through a Shopify or WordPress app, that still works, because Kiescy intercepts the script whichever plugin adds it, as long as Kiescy's script comes first in <head>.
2. Use Meta's consent calls
Meta's own developer guide shows a two-call pattern. Call revoke on every page before init, so the Pixel is paused, then call grant once the visitor agrees:
fbq('consent', 'revoke'); // first, on every page
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
// later, when the visitor accepts advertising cookies:
fbq('consent', 'grant');Meta says revoke pauses sending Pixel fires to Meta. Its guide doesn't say the Pixel's script or cookies are kept off the page, so in the EU the cautious choice is still to not load the script at all until consent (method 1 or 3).
3. Google Tag Manager
If the Pixel runs as a Custom HTML tag in GTM, give it a trigger that fires only after your banner's consent event, or set the tag's Additional consent checks to require ad_storage. Don't fire it on All Pages without a consent condition: GTM's built-in consent checks apply to Google's own tags, not to Meta's.
Tip: With Kiescy you can also run code when a category is allowed: pira.when('advertising', () => { /* load or grant the Pixel */ }). Useful when a developer loads the Pixel from a JavaScript bundle.
Does the Conversions API get around consent?
No. The Conversions API sends events from your server instead of the browser, which avoids ad blockers, but the legal question is about the person and the data, not the route. If a visitor in the EU said no to advertising, sending their purchase from your server to Meta for ads still needs a legal basis, and consent is the one that fits.
- Send server events only for visitors who allowed advertising, and pass the same consent state your banner recorded.
- Use the same event ID for browser and server events so Meta can remove duplicates.
- Hash customer details as Meta requires, and only send what you need.
What your privacy policy should say
Name Meta, say you use the Pixel for advertising and measuring ads, which events you send (page views, purchases), that it runs only with consent where the law requires it, and how to opt out. If you run lead ads too, see privacy policies for Facebook lead ads. For California visitors, link your "Do Not Sell or Share" choice from the policy and the footer; what Global Privacy Control means explains the browser signal you must honour.
How to check the Pixel waits
- Open your site in a private window and open DevTools → Network. Filter for
facebook. - Before choosing anything, there should be no request to connect.facebook.net or facebook.com/tr.
- Check Application → Cookies: no
_fbpyet. - Accept advertising cookies. The Pixel script, a PageView request and the
_fbpcookie should now appear. - Start again and choose Reject: none of them should appear, on any page.
Meta's Pixel Helper browser extension also shows whether the Pixel fired. The free website check runs the first-visit test for you.
Questions
Is the Facebook Pixel illegal in the EU?
No, but using it without prior consent is a problem. Load it only after the visitor accepts advertising cookies, and explain it in your privacy and cookie policy.
Can I use the Meta Pixel without cookies?
The Pixel is built around cookies such as _fbp. Even without cookies, it sends visitor data to Meta, which needs a legal basis in the EU. Treat it as needing consent.
Do I need consent for the Pixel on a Shopify store?
For EU and UK visitors, yes. Shopify's own customer privacy settings or a consent banner can hold the Pixel back; make sure only one tool is in charge.
Does Meta's Limited Data Use setting replace consent?
No. Limited Data Use is Meta's setting for US state privacy laws. It doesn't create consent for EU or UK visitors.
Does the Meta Pixel need consent in the US?
Usually not beforehand, but in California and other states with privacy laws, people can opt out of sharing for targeted ads, and you must honour Global Privacy Control.
Sources
The facts in this guide come from these official sources, last checked on . We review the guide whenever they change.
- Meta for Developers: Meta Pixel and the General Data Protection Regulation
- Meta for Developers: ClickID and the fbp and fbc parameters
- Court of Justice of the EU: Fashion ID, C-40/17 (29 July 2019)
- ePrivacy Directive 2002/58/EC, Article 5(3) (EUR-Lex)
- California Consumer Privacy Act, Civil Code §1798.120 and §1798.140 (California Legislative Information)
Does your Pixel fire before consent?
Our free check opens your site like a first-time visitor and shows whether the Meta Pixel loads before anyone agrees.
Open the free toolThis guide explains the law in general terms and isn't legal advice. Laws change and how they apply depends on your situation; for high-risk processing, ask a lawyer.