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.

Is Meta Pixel GDPR compliant?

Meta Pixel typically loads marketing trackers, which are not strictly necessary for your site to work. Under the GDPR and the ePrivacy Directive, non-essential cookies and trackers must stay blocked until a visitor gives clear opt-in consent. So Meta Pixel can be fully GDPR compliant, but only if your site holds its scripts until consent is granted and lets visitors decline just as easily. Compliance depends on how your site loads Meta Pixel, not on Meta Pixel itself.

Visit website

Consent Categories

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)

Meta Pixel's trackers are very common, seen on about 22% of the sites ConsentStack has scanned. Scan your own site to see which of these are firing before consent.

facebook.netMarketing

facebook.net is a marketing domain operated by Meta Pixel, used to serve ads, build audiences, and measure ad conversions. Seen on about 22% of scanned sites.

connect.facebook.netMarketing

connect.facebook.net is a marketing domain operated by Meta Pixel, used to serve ads, build audiences, and measure ad conversions.

Frequently Asked Questions

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

Facebook
Facebook
Meta's ad and measurement platform, widely embedded on non-Facebook websites via the Meta Pixel. Tracks page views, purchase events, and custom conversions to power retargeting campaigns on Facebook and Instagram. Uses cookies and browser fingerprinting to build audience profiles across the web.
Twitch
Twitch
Twitch embedded stream players and widgets load on third-party websites to display live or recorded streams. Scripts set cookies and send events to Twitch servers to track viewer engagement, serve advertising against embedded streams, and attribute ad impressions to stream inventory.
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.
AdMaven
AdMaven
AdMaven is an ad network specializing in popunder, push notification, and interstitial ad formats. Its scripts load ad creatives into web pages and track impressions, clicks, and conversions. Cookies are set to identify visitors for ad targeting, frequency capping, and advertiser conversion reporting.
The Trade Desk
The Trade Desk
Demand-side platform used by advertisers to buy programmatic display, video, and connected TV inventory. The Trade Desk's Universal Pixel fires on advertiser sites to track conversions and build first-party audiences. The Unified ID 2.0 script may also be present to establish a privacy-preserving identity token for cross-site audience matching.
Freshsales
Freshsales
Freshsales is a CRM platform by Freshworks. Its scripts track website visitor behavior including page views, button clicks, and form interactions. It sets persistent cookies for visitor identification and lead scoring, sending browsing activity data to Freshsales servers for sales pipeline management.

Manage consent for Meta Pixel

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