The Meta Pixel is a small JavaScript file you add to your site. As users navigate, the pixel fires events (PageView, ViewContent, AddToCart, Purchase) back to Meta with metadata about who the user is and what they did. Meta uses that data for three things: audience building (people who viewed product X), conversion optimisation (training the algorithm on who converts), and attribution (matching ad views to later conversions).
Required events
- PageView — fires on every page load. Always set up.
- ViewContent — fires on product page views. Lets you build product-viewer retargeting audiences.
- AddToCart — fires when a user adds an item to cart. Critical for cart-abandonment retargeting.
- InitiateCheckout — fires when checkout starts. Critical for checkout-abandonment recovery.
- Purchase — fires on order completion. Carries the order value, which trains the algorithm on real revenue, not just clicks.
What's broken about it post-iOS
iOS 14.5 + ATT means a large fraction of iOS users opt out of pixel tracking entirely. Meta's solution is conversions API (CAPI) — server-side event tracking that doesn't rely on the pixel firing in the browser. Modern accounts run pixel + CAPI together (called 'dual tracking' or 'redundant deduplication') so they catch what the pixel misses.
Privacy + consent
In the EU, the pixel needs to be loaded only after the user grants consent (cookie banner, GDPR). Pre-consent pixel loading is a violation in most member states. Most operators use a cookie consent management platform that gates the pixel until consent is granted, then back-fills the missed events server-side via CAPI.