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.

Overview

Facebook (Meta) operates the most widely deployed third-party advertising pixel on the web. The Meta Pixel and its successor, the Conversions API, track page views, product interactions, add-to-cart events, and purchases to power retargeting campaigns and lookalike audience building on Facebook and Instagram. Meta's pixel infrastructure feeds one of the largest advertising targeting platforms in existence, matching browser visitors to Facebook user accounts through deterministic (login-based) and probabilistic signals.

What This Script Does

Meta Pixel Base Code

The Meta Pixel base code is a JavaScript snippet that loads connect.facebook.net/en_US/fbevents.js. On load, it fires a PageView event and reads Meta's third-party cookies (_fbp, _fbc) to identify the visitor. It also reads any first-party cookie set via Pixel advanced matching.

Standard Events

Advertisers instrument their pages with standard event calls: fbq('track', 'Purchase', {...}), fbq('track', 'AddToCart', {...}), fbq('track', 'Lead', {...}). Each event fires a pixel beacon to facebook.com/tr with the event data, the _fbp visitor ID, and optionally hashed personal data via advanced matching.

Advanced Matching

Advanced matching allows the pixel to send hashed (SHA-256) versions of the user's email, phone number, name, and address when they are available on the page (e.g., logged in to an account). Meta uses these hashes to match browser visitors to Facebook accounts with higher precision than cookie-based matching alone.

Cookies Set

  • _fbp — First-party persistent cookie. Meta's primary browser pixel identifier, set on the advertiser's domain. Stores a unique Facebook visitor ID. Duration: 90 days.
  • _fbc — First-party persistent cookie. Stores the Facebook click identifier (fbclid) from an ad click URL, used to attribute conversions to specific ad campaigns. Duration: 90 days.
  • fr — Third-party persistent cookie on facebook.com. Meta's core cross-site tracking cookie used for ad targeting and frequency capping. Duration: 90 days.
  • datr — Third-party persistent cookie on facebook.com. Browser identifier used by Meta for security and fraud detection. Duration: 2 years.

Domains Contacted

  • connect.facebook.net — Serves the fbevents.js library.
  • facebook.com/tr — Pixel event beacon endpoint. All fbq() calls send data here.
  • graph.facebook.com — Meta's Graph API endpoint for advanced features and server-side Conversions API.

Data Collected Per Interaction

  • Page URL and referrer for every PageView event
  • Facebook visitor ID (_fbp)
  • Facebook click ID from ad URL (fbc parameter)
  • Event name and properties (purchase value, product IDs, currency, content type)
  • Hashed email, phone, name, and address via advanced matching when provided
  • Browser user-agent, screen resolution, and language
  • IP address (for Conversions API server-side events)
  • Facebook account identity when the user is simultaneously logged into Facebook

Consent & Compliance

GDPR / ePrivacy: The Meta Pixel has been at the center of major GDPR enforcement in Europe. The Irish DPC fined Meta €1.2 billion in 2023 for unlawful EU-US data transfers. Multiple EU DPAs (Austrian DSB, French CNIL, Italian Garante, Belgian APD) have ruled that use of the Meta Pixel without valid prior consent violates GDPR. The pixel sets both first-party and third-party cookies and transmits data to Meta's US servers. Prior explicit consent is required under GDPR Article 6 and the ePrivacy Directive before fbevents.js loads.

CCPA / CPRA: Meta's pixel constitutes a "sale" and "sharing" of personal information under CPRA when used for behavioral advertising. Operators must include a Do Not Sell or Share opt-out and honor Global Privacy Control (GPC) signals.

EU-US Data Privacy Framework: Meta participates in the EU-US DPF. However, given the scale of EU enforcement against Meta specifically, DPF certification alone may not satisfy some EU DPAs' requirements.

IAB TCF Purposes: Purpose 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Meta is a registered IAB TCF vendor (Vendor ID 999).

Should You Block This Without Consent?

Yes. The Meta Pixel is among the highest-risk third-party scripts from a GDPR enforcement perspective. Multiple EU DPAs have issued fines and orders specifically targeting the Meta Pixel. It must not load until the user has explicitly accepted marketing cookies. Consent management platforms should block connect.facebook.net until consent is confirmed.

Is Facebook GDPR compliant?

Facebook typically loads marketing, social media and analytics 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 Facebook 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 Facebook, not on Facebook itself.

Visit website

Products (7)

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.
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.
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.

Consent Categories

Also Known As

FacebookMeta PixelFacebook PixelMeta advertisingretargeting cookiesFacebook trackingfbq

Industries

Computers Electronics and TechnologySocial Networks and Online Communities

Tracked Domains (3)

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

facebook.comMarketing

facebook.com is a marketing domain operated by Facebook, used to serve ads, build audiences, and measure ad conversions. Seen on about 20% of scanned sites.

fbcdn.netSocial Media

fbcdn.net is a social media domain operated by Facebook, used to power social embeds, share buttons, and audience matching. Seen on under 1% of scanned sites.

atdmt.comMarketing

atdmt.com is a marketing domain operated by Facebook, used to serve ads, build audiences, and measure ad conversions. Seen on a small share of scanned sites.

Cookies Facebook Sets (2)

_fbp

Meta Pixel first-party browser identifier set on the customer apex by the Pixel JavaScript. 90-day expiration; used to deduplicate events across the Pixel and Conversions API.

_fbc

Meta Pixel click-attribution cookie set when the visitor arrives via an fbclid query parameter. 90-day expiration; carries the click ID for ad attribution.

Frequently Asked Questions

Related Vendors

Mailjet
Mailjet
Mailjet is an email service provider for transactional and marketing email delivery. Websites embed Mailjet subscription forms to capture email addresses for mailing lists. Scripts handle form validation and submission. Sets minimal session cookies for form state management.
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.
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.
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.
Magnite
Magnite
Supply-side platform formed by the merger of Rubicon Project and Telaria. Magnite connects publishers to programmatic ad buyers for display, video, and CTV inventory. The Magnite script participates in header bidding auctions and sets cookies to sync user identifiers with demand partners.
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.

Manage consent for Facebook

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