Meta's Conversions API (CAPI) has become the essential foundation of any advertising strategy on Facebook and Instagram in 2026. Without it, your Business Manager underestimates part of your conversions, your bidding algorithm works blind, and you make budget decisions based on skewed numbers.
This guide explains exactly what CAPI is, how to configure it correctly, how to optimize the EMQ score that determines the quality of your matching, and how to avoid the common mistakes that sink naive implementations.
What is Meta's Conversions API?
The Conversions API (CAPI) is a server-to-server interface that lets your website or app send conversion events (purchases, leads, add to carts) directly to Meta's servers, without going through the user's browser.
The classic Meta pixel (fbq('track', 'Purchase')) runs in the customer's browser. It relies on third-party cookies, the IDFA on iOS, and the absence of ad blockers. With iOS 14.5 and the ATT framework, a large share of the pixel signal disappeared.
CAPI gets around these limits by sending conversions from your backend server (or a third-party service) directly to the endpoint https://graph.facebook.com/v22.0/[pixel_id]/events. The data reaches Meta even if:
- The user has an active ad blocker
- The user is on Safari (ITP) or Firefox (ETP)
- The user is on iOS 14+ without having given ATT consent
- The client pixel was blocked by a CMP before it loaded
In practice, CAPI recovers a large part of the conversion signal that the pixel alone no longer captures. According to Meta, advertisers who use the Conversions API for their web events have on average a 17.8% lower cost per result (Meta source, April 2026).
How CAPI works technically
Sending a CAPI event follows 5 steps.
Step 1: Capture the event. When a user buys on your site, your backend (or a third-party service like DataHide) captures the event with all its data: value, currency, product ID, transaction ID, order ID.
Step 2: Collect user parameters. The backend collects the data that identifies the user: email, phone, first name, last name, postal code, city, country, date of birth. Plus: IP address, user-agent, _fbp and _fbc cookies.
Step 3: SHA-256 hashing. All personal data (PII) is hashed with SHA-256 before sending, in line with Meta's requirements and the GDPR. The hash is one-way: Meta can compare hash(sent_email) with hash(facebook_account_email) to match, but cannot rebuild the original email.
Step 4: Send to the Graph API. The server makes an HTTPS POST to graph.facebook.com/v22.0/[pixel_id]/events with a valid Meta access token and the JSON payload formatted to Meta's spec.
Step 5: Deduplicate with the pixel. If the pixel also sent the same event (the ideal double-tracking case), Meta deduplicates by keeping a single event per unique event_id.
The result: Meta receives each conversion once, with as much matching signal as possible, regardless of browser limits.
CAPI setup step by step
Here is the complete procedure to turn on CAPI for your Meta account. Count 30 to 60 minutes depending on your technical level.
Step 1: Get your Pixel ID
In Meta Events Manager (business.facebook.com/events_manager), select your dataset (formerly called pixel). The ID is shown at the top of the page, a 15-digit number (for example 123456789012345).
If you do not have a dataset yet, create one through Events Manager > "Connect data sources" > "Web" > "Conversions API". Meta will ask you to name your dataset and attach it to a Business Manager.
Step 2: Generate a CAPI access token
In Events Manager, go to your dataset's "Settings" tab, scroll down to the "Conversions API" section and click "Generate access token". Meta gives you a token in the format EAAxxx... (very long).
Security warning. This token grants write access to your dataset. Store it in a secret manager (Vercel env vars, AWS Secrets Manager) and never in the source code or in the browser. A compromised token lets a third party send fake events and pollute your Meta optimization.
Step 3: Prepare the event payload
The JSON payload for a Purchase event looks like this:
{
"data": [
{
"event_name": "Purchase",
"event_time": 1714700000,
"event_id": "evt_abc123_2026-05-02T14:00:00Z",
"action_source": "website",
"event_source_url": "https://datahide.fr/checkout/success",
"user_data": {
"em": ["sha256_hash_email"],
"ph": ["sha256_hash_phone"],
"fn": ["sha256_hash_first_name"],
"ln": ["sha256_hash_last_name"],
"client_ip_address": "203.0.113.42",
"client_user_agent": "Mozilla/5.0 ...",
"fbp": "fb.1.1714700000.1234567890",
"fbc": "fb.1.1714700000.IwAR..."
},
"custom_data": {
"currency": "EUR",
"value": 1497.00
}
}
]
}
The em, ph, fn and ln fields are arrays of lowercase hexadecimal SHA-256 hashes.
Step 4: Make the POST call
curl -X POST \
"https://graph.facebook.com/v22.0/123456789012345/events?access_token=EAAxxx..." \
-H "Content-Type: application/json" \
-d @payload.json
Meta returns a JSON object with events_received: 1 if everything is OK, or an explicit error (invalid token, malformed payload, missing required parameters).
Step 5: Check in Events Manager
In Events Manager > "Test events" tab, you can see in real time the events received, their source (Pixel, CAPI, or both), and the associated EMQ score.
Time to appear. Count 5 to 30 minutes for a CAPI event to show up in Test events. For it to influence the campaign optimization algorithm, you need to wait 24 to 72 hours.
Event Match Quality (EMQ): the critical metric
In 2021, Meta introduced a score from 0 to 10 called Event Match Quality that measures the quality of the matching between the events you send and real Facebook users.
| EMQ score | Level | Interpretation |
|---|---|---|
| 0 - 3 | Critical | Algorithm works blind, reported ROAS skewed |
| 4 - 5 | Poor | Underperforming optimization, a large share of the signal lost |
| 6 - 7 | Acceptable | Decent performance, room for improvement |
| 8 - 9 | Good | Well-informed algorithm, representative ROAS |
| 10 | Perfect | Every possible signal sent and matched |
EMQ is calculated per event (Lead, AddToCart, Purchase) and per dataset. You find it in Events Manager > "Diagnostics" tab > "Quality of customer information parameters" section.
How to maximize your EMQ
EMQ depends on the number of user parameters you send and their quality. Here is the list ranked by weight in matching:
| Parameter | Code | Matching weight | Source |
|---|---|---|---|
em | Very strong | Customer form | |
| Phone | ph | Very strong | Customer form |
| External ID | external_id | Strong | Internal ID (CRM, database) |
| fbp cookie | fbp | Strong | Meta pixel |
| fbc click ID | fbc | Strong | fbclid URL parameter |
| First name + Last name | fn, ln | Medium | Customer form |
| Postal code + Country | zp, country | Medium | Customer form |
| IP + User-agent | client_ip_address, client_user_agent | Low | HTTP request |
| Date of birth | db | Low (often missing) | Customer form |
Golden rule. Always send hashed email + phone + IP + user-agent + fbp + fbc with every event. That is the minimum to reach EMQ 8+.
Indicative orders of magnitude:
- Email only: EMQ 4 to 5
- Email + phone: EMQ 6 to 7
- Email + phone + IP/UA + fbp: EMQ 7 to 8
- Email + phone + IP/UA + fbp + fbc + name: EMQ 8 to 9
- All the fields above + external_id: EMQ 9 to 10
Pixel + CAPI deduplication: the absolute rule
The No. 1 mistake I see in homemade CAPI implementations: sending CAPI without deduplication against the client pixel. Result: each conversion is counted twice, your reported ROAS is artificially inflated, and Meta's algorithm ends up penalizing you when it detects the duplicates.
The solution: always send a unique event_id to the pixel AND to CAPI for the same event.
Client pixel side:
const eventId = "evt_" + crypto.randomUUID();
fbq('track', 'Purchase', {
value: 1497,
currency: 'EUR'
}, {
eventID: eventId
});
// Send the same eventId to the backend for CAPI
fetch('/api/track', {
method: 'POST',
body: JSON.stringify({ event: 'Purchase', eventId, value: 1497 })
});
CAPI backend side:
const payload = {
event_name: "Purchase",
event_id: eventId, // SAME event_id as the pixel
event_time: Math.floor(Date.now() / 1000),
// ... rest of the payload
};
Meta deduplicates automatically by keeping a single event per event_id. If only the pixel got through (the optimistic case), it counts. If only CAPI got through (the pixel was blocked), it counts. If both get through, only one is kept. No double counting.
Common mistakes to avoid
Mistake 1: Incorrect hashing. The SHA-256 hash must be calculated on the normalized value: email lowercased and trimmed, phone as digits only with the country code (33612345678: no +, no spaces, no leading 0), first/last name lowercased. A normalization error = zero matching.
Mistake 2: Sending data in clear text. Meta rejects events with unhashed PII. Explicit API error: "User data must be hashed". Check that all em, ph, fn, ln, zp and db values are 64-character hexadecimal hashes.
Mistake 3: Forgetting action_source. This required field says where the event comes from: website, email, app, phone_call, chat, physical_store, system_generated, business_messaging. Without it, Meta returns an error or ignores the event.
Mistake 4: Timestamp in milliseconds. event_time must be a Unix timestamp in seconds (10 digits), not in milliseconds (13 digits). A frequent mistake with Date.now(), which returns milliseconds by default. Divide by 1000 and round.
Mistake 5: No retry on network errors. The Meta API can return temporary 5xx errors. Without retries, you lose those events. Implement a retry with exponential backoff (3 attempts, spaced 1s, 5s, 30s).
Mistake 6: Expired token. The CAPI access token can expire if you have not set up a Business Integration System User. Your implementation must log 401 errors explicitly and alert you to regenerate the token.
Implementing CAPI: 3 approaches
Approach 1: Homemade code. You code the calls to graph.facebook.com from your backend and handle hashing, deduplication, retries and EMQ monitoring. Typical tech stack: Node.js / Python / PHP with an HTTP library. Count 3 to 7 days of senior development for a production-ready implementation, plus ongoing maintenance as the Meta API evolves (Graph versions, new parameters, format changes).
Approach 2: Server-Side Tag Manager (Google). You deploy a server GTM container (on Google Cloud Run, AWS or dedicated hosting) and configure the Meta CAPI tag provided by Meta. Pro: flexibility, multi-platform (Meta + Google + TikTok in a single GTM). Con: hosting at 100-300 EUR/month, complex server GTM configuration, monitoring to set up separately.
Approach 3: Dedicated tool (DataHide, Hyros, TripleWhale). You install a lightweight script on your site, connect your Meta dataset through OAuth, and the tool handles everything: deduplicated pixel + CAPI sending, hashing, EMQ monitoring, automatic retries, Graph API version updates. At DataHide, setup takes 10 minutes, on a video call with the founder. See our detailed Hyros vs DataHide comparison to choose between tools.
For most course creators without a dedicated dev team, approach 3 is the most pragmatic. The monthly cost of a tool (from €249 to €2,990 excl. VAT per month for DataHide, depending on your ad budget) is lower than the hidden cost of a homemade implementation that silently degrades.
Example: raising EMQ in two weeks
Let's take an illustrative example: a business coach who invests on Meta every month, whose Business Manager shows a reported ROAS far below his real sales. No CAPI implementation (client pixel only, and half blocked by his CMP).
Week 1: Initial setup.
- CAPI turned on through DataHide (10-minute setup on a video call: Meta connection + pixel script)
- Pixel + CAPI sending with a unique event_id for deduplication
- Automatic SHA-256 hashing of email + phone
- Baseline EMQ reading on Lead and Purchase
Week 2: Parameter optimization.
external_id(CRM contact ID) added to the payload- Systematic server-side capture of IP + user-agent
_fbpcookie +fbc(from the fbclid URL parameter) collected- New EMQ reading
What to look at on D+30:
- the conversions Meta receives get closer to real sales;
- reported ROAS lines back up with what Stripe collects;
- the decision on Meta (cut or scale) finally rests on real sales, not on half the signal.
Frequently asked questions
Is CAPI mandatory or just recommended?
Technically, the client pixel alone still works. In practice, without CAPI you lose part of the signal in 2026, your reported ROAS is skewed, and Meta's algorithm optimizes on incomplete data. No serious media team does without CAPI today.
Should you keep the client pixel if you have CAPI?
Yes, absolutely. Meta explicitly recommends the pixel + CAPI combo with deduplication. The pixel captures users without blockers in real time, provides the _fbp cookie (impossible to generate server-side), and keeps working even if your backend server has downtime.
Is CAPI GDPR compliant?
CAPI allows a GDPR-compliant implementation if you meet 3 conditions: get user consent through a CMP before any sending, hash PII with SHA-256 before transmission, and sign a DPA with Meta (available in Business Settings).
How do you handle CAPI with a CMP like Axeptio or Didomi?
The CMP must send a consent signal to your backend (cookie or URL parameter). Your backend only triggers the CAPI call if marketing consent is given. Without consent, neither the pixel nor CAPI fires. The logic is identical to the classic client pixel, simply applied server-side.
What minimum ad volume makes CAPI worthwhile?
CAPI has value from the first euro of ad spend. Tracking accuracy improves decisions at every volume. The cost of a dedicated tool (from €249 to €2,990 excl. VAT per month at DataHide, depending on ad budget) weighs less and less as the budget grows. On a small budget, it is a larger share, but the accuracy is still useful.
How long before you see CAPI's impact on ROAS?
EMQ improves within 24 to 72 hours after the first well-matched events are sent. Meta's algorithm takes in the new signal and re-optimizes bids within 7 to 14 days. Reported ROAS lines back up with what Stripe shows within 14 to 30 days, depending on conversion volume.
Which events should you send through CAPI first?
The Purchase event is by far the most important (main optimization signal). Then: InitiateCheckout, AddPaymentInfo, Lead. For long funnels, add ViewContent and AddToCart. For B2B SaaS: CompleteRegistration, StartTrial, Subscribe.
Recap: why CAPI is priority number 1 in 2026
CAPI is no longer optional in 2026: it is the essential foundation of any Meta advertising. Without CAPI, you work with an incomplete signal and make decisions blind. With well-configured CAPI (EMQ 8+), you get back the accuracy we had before iOS 14, or even better.
The initial investment (a 10-minute setup on a video call with DataHide, or several days of development with a homemade approach) is ridiculously small compared to what it brings to your decisions.
If you run Meta ads every month and you do not yet have CAPI configured with an EMQ above 7, it is probably the most profitable project you can start this week.
You can try DataHide free for 14 days and see your real EMQ on your events, after a 10-minute setup.