Meta Conversions API Setup Guide: Pixel + CAPI Without Double Counting
The Meta Pixel runs in the visitor’s browser, and browsers have become hostile to tracking scripts. Ad blockers block it, iOS and Safari limit its cookies, and visitors who decline cookies never load it. Every lost event makes Meta’s delivery algorithm a little blinder.
The Meta Conversions API (CAPI) sends the same events from a server instead of the browser. Run together with the Pixel, it gives Meta a more complete picture of who converted, without counting anyone twice.
This guide explains how CAPI works, the four ways to set it up, and the two things that decide whether it actually helps: deduplication and customer data quality.
Pixel vs Conversions API
| Meta Pixel | Conversions API | |
|---|---|---|
| Runs in | The visitor’s browser | Your server (or a hosted server) |
| Affected by ad blockers and browser limits | Yes | Much less |
| Can send offline or CRM events | No | Yes |
| Setup effort | Low | Medium |
| Meta’s recommendation | Use both together | Use both together |
The goal is not to replace the Pixel. It is a redundant setup: the browser and the server both send each event, and Meta keeps one copy.
Four ways to set up CAPI
1. Platform integrations. Shopify, WooCommerce and several other platforms offer a Meta integration that turns on CAPI with a few clicks. This is the fastest option, but you get limited control over which events and data are sent, and the integration may conflict with a Pixel you added yourself.
2. Conversions API Gateway. Meta’s own hosted option, set up from Events Manager on your cloud account. It mirrors Pixel events to the server automatically. Good for teams without developers, but it only covers events the Pixel already sees.
3. Server-side Google Tag Manager. A server GTM container (self-hosted on Google Cloud or hosted by a provider such as Stape) receives events from your website’s GTM and forwards them to Meta with a CAPI tag. You get full control over events, parameters and data enrichment, and the same container can feed GA4, Google Ads and TikTok. This is the setup I use most often. See the server-side tracking and Meta CAPI service for how I implement it.
4. Direct API integration. Your developers call the Conversions API from your backend. This is the most flexible option and the only one that can send events that never touch the website, such as a CRM deal marked “won” or a phone sale.
Deduplication: the step most setups get wrong
When the Pixel and CAPI both send a purchase, Meta needs to know it’s the same purchase. It decides using two fields:
event_name: must be identical in both (for examplePurchase).event_id: a unique ID for this specific event, identical in the browser event and the server event.
If both match within Meta’s deduplication window (48 hours), Meta keeps one event. If event_id is missing or different, Meta counts two purchases and your reported results double.
How to get it right:
- Generate the ID once, on the page, when the event happens. The order number works well for purchases; for leads, a random ID created at form submission.
- Send that ID as
eventIDin the Pixel call and asevent_idin the server event. - Never generate a new ID on the server for an event that the browser also sends.
You can check whether your browser and server events would deduplicate with the Meta CAPI Deduplication Checker.
Customer data and Event Match Quality
Meta matches server events to people using customer information parameters. The more (and better) parameters you send, the higher the Event Match Quality (EMQ) score in Events Manager, and the more conversions Meta can attribute to the right person.
| Parameter | What it is | Hashed? |
|---|---|---|
em | Email address | Yes, SHA-256 |
ph | Phone number with country code | Yes, SHA-256 |
fn, ln | First and last name | Yes, SHA-256 |
ct, st, zp, country | City, state, postcode, country | Yes, SHA-256 |
external_id | Your own customer ID | Recommended |
client_ip_address | Visitor IP | No |
client_user_agent | Browser user agent | No |
fbp | _fbp browser cookie | No |
fbc | _fbc cookie / fbclid click ID | No |
Two rules matter most:
- Normalise before hashing. Lowercase and trim emails; phone numbers as digits with country code and no symbols. A hash of
John@Example.comwon’t match a hash ofjohn@example.com. The Customer Data Hasher shows the exact normalised and hashed values. - Always forward
fbpandfbc. They link the server event to the browser session and the ad click, and they are the parameters most often left out.
To see roughly which score your current setup would get, try the CAPI EMQ Predictor.
Other required fields
Every web event sent through CAPI also needs:
action_source:websitefor website events (system_generated,physical_storeand others exist for non-web events).event_source_url: the page where the event happened.event_time: a Unix timestamp in seconds. Events older than seven days are rejected.
Purchases also need value and currency.
Testing your setup
- In Events Manager → your dataset → Test events, copy the test event code and add it to your server events temporarily.
- Trigger a test purchase or lead on the site.
- You should see the event twice: once from the Browser and once from the Server, with the server one marked as deduplicated.
- Remove the test code when you’re done.
- A few days later, check Overview for the EMQ score per event and Diagnostics for warnings such as missing parameters or low deduplication.
Common mistakes
- Two Pixels firing (a platform integration plus a manual GTM Pixel), which creates duplicates that CAPI can’t fix.
- No
event_id, so every server event is counted in addition to the browser event. - Hashing already-hashed data, or hashing IP and user agent, which must be sent unhashed.
- Sending server events without consent. If a visitor declines marketing cookies, your server events must respect that choice too.
- Only sending Purchase. Sending the funnel events (ViewContent, AddToCart, InitiateCheckout, Lead) gives Meta more signal to optimise with.
Is CAPI worth it for you?
If you spend meaningfully on Meta Ads, sell to iOS-heavy audiences or see a gap between Meta-reported and actual sales, a properly deduplicated Pixel + CAPI setup is one of the most valuable tracking upgrades you can make. If you want it done right the first time, see my Meta Pixel + CAPI server-side service or book a free tracking audit.
Need this implemented, audited, or white-labeled?
Whether you are an eCommerce brand owner fixing signal loss or a digital marketing agency needing a senior analytics engineer under strict NDA, I deliver 24–48h SLA turnaround with 8.5+ EMQ match rates.

