The Meta Pixel (formerly Facebook Pixel) is code on your website that sends events to Meta when someone views a page, adds to cart or buys. The Conversions API (CAPI) sends the same events from your server instead of the browser.
Together they give Meta better data. On its own, the pixel loses signals to ad blockers, browser restrictions and declined consent.
Standard events
| Event | When | Who needs it |
|---|---|---|
| PageView | Every page view | Everyone |
| ViewContent | Product or service page | Ecommerce, services |
| AddToCart | Item added to cart | Ecommerce |
| Purchase | Completed order with value and currency | Ecommerce |
| Lead | Form submitted | Services and B2B |
Why add the Conversions API?
CAPI sends events directly from your store, CRM or server, so they are not blocked in the browser. You can also send events that happen later, such as a lead becoming a customer. CAPI does not replace the pixel. Meta recommends running both.
Deduplication
When both browser and server send the same purchase, use a shared event ID. The pixel sends eventID, the server sends event_id with the same value, and the event name must match. Meta then discards the duplicate if it arrives within 48 hours. Without it, purchases are counted twice and ROAS looks better than it is.
Setup
- Create or find the dataset (pixel) in Events Manager.
- Install the pixel via Google Tag Manager or your platform integration (Shopify, WooCommerce).
- Enable CAPI via the platform integration, a partner or server-side GTM.
- Send the same event_id from browser and server.
- Send hashed customer data where consent allows, to raise Event Match Quality.
- Check deduplication and Event Match Quality in Events Manager.
In Norway and the EU, events should only be sent to Meta when the user has consented to marketing. A server setup is not a way around consent. See server-side tagging.
Frequently asked questions
What is the Meta Pixel?
Code on your website that sends events such as page views, add to cart and purchases to Meta, used to measure ads, build audiences and optimise campaigns.
Is Facebook Pixel the same as Meta Pixel?
Yes. It was renamed after Facebook became Meta in 2021.
Do I need the Conversions API if I have the pixel?
For most advertisers, yes. The pixel loses signals in the browser, and CAPI fills the gaps from the server.
How do I avoid double counting with pixel and CAPI?
Send the same event name and the same event ID from browser (eventID) and server (event_id). Meta discards the duplicate within 48 hours.
Read also
Sources
- Meta for Developers, Meta Pixel: developers.facebook.com/docs/meta-pixel
- Meta for Developers, Conversions API: developers.facebook.com/docs/marketing-api/conversions-api
- Meta for Developers, Handling Duplicate Pixel and Conversions API Events: developers.facebook.com/docs/marketing-api/conversions-api/d