Overview
Meta Pixel (formerly Facebook Pixel) is the conversion tracking and audience-building tool for advertisers on Facebook and Instagram. It is one of the most widely deployed advertising scripts on the internet, present on millions of websites globally. The pixel collects behavioral data on advertiser websites and matches it to Facebook user profiles, enabling advertisers to measure ad campaign performance, build retargeting audiences, and create lookalike audiences from their customer data.
What This Script Does
Pixel Base Code
The Meta Pixel base code snippet loads fbevents.js from connect.facebook.net. On initialization, it fires a PageView event and establishes the visitor's pixel ID by reading the _fbp first-party cookie or creating a new one if absent. The pixel ID is linked to Meta's identity graph, which may associate it with a logged-in Facebook account.
Event Tracking
Advertisers call fbq('track', EventName, parameters) at key conversion points. Supported standard events include ViewContent, Search, AddToCart, AddToWishlist, InitiateCheckout, AddPaymentInfo, Purchase, Lead, and CompleteRegistration. Each event fires a GET/POST beacon to facebook.com/tr containing the event data.
Custom Audiences & Conversions
Pixel event data populates Custom Audiences — segments of users who performed specific actions on the advertiser's site. These audiences are then targetable in Facebook Ads Manager for retargeting campaigns. Purchase events with revenue data feed conversion attribution reports.
Cookies Set
_fbp— First-party persistent cookie on the advertiser's domain. Meta's pixel visitor identifier, used to match browser sessions to Facebook ad exposure. Duration: 90 days._fbc— First-party persistent cookie on the advertiser's domain. Stores thefbclidclick ID from the ad click URL. Duration: 90 days.fr— Third-party persistent cookie onfacebook.com. Meta's cross-site tracking cookie for ad targeting and reach/frequency management. Duration: 90 days.
Domains Contacted
connect.facebook.net— Servesfbevents.js.facebook.com/tr— Event beacon endpoint for all pixel events.www.facebook.com— Accessed when Meta reads thefrthird-party cookie for cross-site identity resolution.
Data Collected Per Interaction
- Page URL and referrer on every page view
- Pixel visitor ID (
_fbp) and click ID (_fbc) - Standard event name and all associated parameters (product IDs, value, currency, content type)
- Hashed email, phone number, first name, last name, city, state, zip, and country via advanced matching
- Browser user-agent, screen resolution, timezone, and language
- IP address
- Facebook account association when the visitor is concurrently logged into Facebook or Instagram
Consent & Compliance
GDPR / ePrivacy: The Meta Pixel has been the subject of the most significant GDPR enforcement actions in the EU. The Austrian DSB (January 2022), French CNIL (January 2022), Italian Garante, and Belgian APD all ruled that websites using the Meta Pixel without valid consent violate GDPR, primarily because data is transferred to US servers without an adequate transfer mechanism. The Irish DPC issued a €1.2 billion fine against Meta in May 2023. Under the ePrivacy Directive, the _fbp cookie requires prior opt-in consent. Meta is an IAB TCF registered vendor (Vendor ID 999) but TCF consent alone has been challenged as insufficient by some EU DPAs.
CCPA / CPRA: Use of the Meta Pixel constitutes "sharing" of personal information for cross-context behavioral advertising under CPRA. Advertisers must provide a Do Not Sell or Share link and honor the Global Privacy Control (GPC) signal.
EU-US Data Privacy Framework: Meta is certified under the EU-US DPF. Given the enforcement history, operators should carefully assess whether DPF certification is sufficient for their jurisdiction.
IAB TCF Purposes: Purposes 1–10 (full range). Vendor ID 999.
Should You Block This Without Consent?
Yes. The Meta Pixel must not fire until explicit prior marketing consent is obtained. It is one of the most enforcement-targeted advertising scripts in European data protection law. Consent management platforms must block both connect.facebook.net and the fbq() initialization code until the user actively accepts marketing cookies. No legitimate interest or other alternative lawful basis applies to advertising profiling by the Meta Pixel.
Consent Categories
Also Known As
Industries
Tracked Domains (2)
facebook.netMarketingconnect.facebook.netMarketingFrequently Asked Questions
Does the Meta Pixel require cookie consent?
Yes. Meta Pixel is classified under marketing. It is one of the most enforcement-targeted advertising scripts in EU law, with major DPA rulings against it. The _fbp cookie and all fbq() event tracking require explicit prior opt-in consent. No legitimate interest basis applies to advertising profiling.
What cookies does the Meta Pixel set?
Meta Pixel sets _fbp (first-party, 90 days) — a browser identifier on the advertiser's domain — and _fbc (90 days) storing the Facebook click ID from ad URLs. The third-party fr cookie (90 days) on facebook.com enables cross-site ad targeting. Data is sent to facebook.com/tr on every page view.
How does ConsentStack handle the Meta Pixel?
ConsentStack blocks both connect.facebook.net and the fbq() initialization code until explicit marketing consent is granted. Given enforcement actions by Austrian DSB, French CNIL, and the Irish DPC, ConsentStack treats Meta Pixel as a critical block with no fallback loading under legitimate interest.
Other Facebook Products

Related Vendors
Manage consent for Meta Pixel
ConsentStack automatically detects and manages Meta Pixel trackers so your site stays compliant with global privacy regulations.
