Meta Pixel

Meta Pixel

Meta Pixel (formerly Facebook Pixel) is a conversion tracking and audience-building tool used by advertisers running campaigns on Facebook and Instagram. Scripts fire events on advertiser websites when users complete actions like purchases or form submissions. Collected data is used for ad targeting, retargeting, and conversion attribution.

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 the fbclid click ID from the ad click URL. Duration: 90 days.
  • fr — Third-party persistent cookie on facebook.com. Meta's cross-site tracking cookie for ad targeting and reach/frequency management. Duration: 90 days.

Domains Contacted

  • connect.facebook.net — Serves fbevents.js.
  • facebook.com/tr — Event beacon endpoint for all pixel events.
  • www.facebook.com — Accessed when Meta reads the fr third-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.

Visit website

Consent Categories

Marketing

Also Known As

Facebook PixelMeta Pixel_fbp cookie_fbc cookieFacebook tracking pixelMeta ads pixelfbevents.jsFacebook GDPR

Industries

Computers Electronics and TechnologySocial Networks and Online Communities

Tracked Domains (2)

facebook.netMarketing
connect.facebook.netMarketing

Frequently 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

Facebook Login
Facebook Login
Facebook Login is a Meta OAuth authentication service that allows users to sign in to third-party websites using their Facebook account. Scripts load the Meta SDK, set cross-site session cookies for authentication, and may share login activity data with Meta.
Instagram
Instagram
Instagram tracking scripts support conversion measurement for Meta advertising campaigns running on Instagram. Scripts fire on advertiser websites to capture click-through and view-through conversions from Instagram ad placements. Collected data flows into Meta Ads Manager for attribution reporting and audience building.
Facebook Comments
Facebook Comments
Facebook Comments is a Meta social plugin that embeds a comment system on external websites. Scripts load the Meta SDK, set Facebook tracking cookies on page load, and send engagement data to Meta regardless of whether visitors interact with the widget.
Facebook Like Button
Facebook Like Button
Facebook Like Button is a Meta social plugin that embeds a like and react button on external websites. Scripts load the Meta SDK and set Facebook tracking cookies on page load regardless of visitor interaction. Browsing data may be shared with Meta for ad targeting purposes.
Facebook Share Button
Facebook Share Button
Facebook Share Button is a Meta social plugin that lets visitors share web content to their Facebook feed. Scripts load the Meta SDK and set cross-site tracking cookies on page load, enabling Meta to track visits and attribute browsing behavior for advertising purposes.
Instagram Feed
Instagram Feed
Instagram Feed embeds allow websites to display Instagram posts and media galleries. Scripts load Meta's Instagram embed code, set tracking cookies, and send interaction data to Meta. Visitor browser data may be shared with Meta on page load regardless of whether visitors interact with the content.

Related Vendors

Google Ads
Google Ads
Google Ads is Google's advertising platform for search, display, and remarketing campaigns. Conversion tracking scripts fire on advertiser landing pages to measure actions taken after ad clicks. The remarketing tag builds audience lists for retargeting users across Google's ad network.
Google
Google
Google is the dominant provider of web analytics, advertising, and infrastructure tools. Scripts like Google Analytics, Tag Manager, Ads, and reCAPTCHA collect behavioral data, manage tag firing, serve targeted ads, and detect bots. Sets persistent cookies to track users and correlate activity across sites.
Microsoft Dynamics 365
Microsoft Dynamics 365
Microsoft Dynamics 365 is a suite of CRM and ERP applications that integrates with websites through tracking scripts and embedded forms. Web tracking code captures visitor behavior, page views, and form submissions to build customer profiles and score leads. Sets cookies to identify returning visitors and attribute marketing touchpoints across sessions.
Microsoft
Microsoft
Runs Clarity (session recording and heatmaps), the Microsoft Advertising UET tag (conversion tracking), and Bing's remarketing pixel. Clarity injects a recording script that captures mouse movements, clicks, and rage clicks. The UET tag fires conversion events to tie ad clicks to on-site actions across Microsoft's ad network.
Microsoft Advertising UET Tag
Microsoft Advertising UET Tag
Microsoft Advertising UET Tag is the Universal Event Tracking pixel for Microsoft's ad platform, formerly Bing Ads. The JavaScript tag fires on advertiser websites to track page views, conversions, and custom events for campaign optimization. Sets cookies to identify visitors across sessions and attribute conversions to Microsoft Search and Audience Network ad clicks.
LinkedIn Ads
LinkedIn Ads
LinkedIn Ads is LinkedIn's advertising platform for B2B marketing and professional audience targeting. Conversion tracking scripts and pixels fire on advertiser websites to measure sign-ups, downloads, and purchases driven by LinkedIn ad campaigns. Sets cookies for audience matching, retargeting list building, and cross-device attribution reporting.

Manage consent for Meta Pixel

ConsentStack automatically detects and manages Meta Pixel trackers so your site stays compliant with global privacy regulations.