Quick answer: To set up the Facebook (Meta) Conversions API, you need a Pixel/dataset ID, a Business Manager, and a Conversions API access token (generated in Events Manager → Settings → Conversions API). Then pick one of three ways to send events — a no-code partner integration, Meta's Conversions API Gateway, or a direct developer integration — send each server event with a shared event ID so it deduplicates against the pixel, and confirm it in Test Events. Partner integrations are the fastest path for most teams.
The 5-minute setup for lead forms: you take care of your landing page and funnel, Collectform is the lead-gen form you embed into it, and it handles the CAPI setup for the form's lead events. Paste your Pixel ID and access token into the form's Integrations tab, map your fields, and it sends hashed, deduplicated events server-side automatically, done in about five minutes, no code or tag manager. The full manual walkthrough is below.
What the Conversions API actually is
The Conversions API (CAPI) sends conversion events to Meta server-to-server, instead of relying only on the browser pixel. Browser pixels get blocked or degraded by ad blockers, iOS App Tracking Transparency, and Safari ITP, so a large share of events never reach Meta — which starves your campaigns of the signal they optimize on. We break down that failure mode in why your Meta Pixel fires but conversions vanish.
CAPI fixes it by sending the event from your server. Meta treats the Pixel and CAPI as a single dataset and recommends running both together, deduplicated by a shared event ID so nothing is double-counted.
Before you start: what you need
| Requirement | Where to get it |
|---|---|
| Meta Pixel / dataset ID | Events Manager → your data source (a 15–16 digit number) |
| Business Manager | business.facebook.com — required to use the API |
| Access token | Events Manager → Settings → Conversions API (see Step 2) |
| A sending method | Partner integration, Conversions API Gateway, or direct code |
The three ways to set up CAPI
Meta gives you three official setup paths (compare them here). Pick based on how much engineering you want to do:
| Method | Effort | Best for |
|---|---|---|
| Partner integration | No code | Most businesses — Shopify, WordPress, GTM, or a form/funnel tool where you paste Pixel ID + token |
| Conversions API Gateway | Low-code, self-hosted | Teams that want Meta's own gateway and can run it on AWS or GCP (cloud costs apply) |
| Direct integration | Developer required | Custom stacks that send events to the Graph API themselves for full control |
The rest of this guide covers the shared setup (Pixel ID + token + testing) and then each method.
Step 1: Get your Pixel (dataset) ID
In Events Manager, select your data source. The Pixel/dataset ID is the long number shown at the top. If you don't have a pixel yet, create one first — CAPI attaches to an existing dataset; it doesn't replace the pixel.
Step 2: Generate your Conversions API access token
- In Events Manager, open your dataset (Pixel).
- Go to the Settings tab.
- Scroll to the Conversions API section.
- Under Set up manually, click Generate access token.
Meta automatically creates a Conversions API app and system user for you. (If you manage your own app, you can instead create a system user in Business Settings, assign the pixel, and generate a token there.)
Treat this token like a password. Store it server-side or in your integration's settings — never paste it into browser-side JavaScript, where anyone could read it.
Step 3: Choose and connect your setup method
Option A — Partner integration (no code)
If you run on a supported platform, this is the fastest route. Find the CAPI setting in the platform's admin panel or official plugin, paste your Pixel ID and access token, toggle CAPI on, and map the events you want to send. The partner handles the server calls, hashing, and formatting for you.
Option B — Conversions API Gateway
Meta's Conversions API Gateway is a code-free but self-hosted option. You install Meta's package on your own cloud instance (AWS EKS/ECS or GCP) and it forwards events for you. It avoids writing code but you own the cloud infrastructure and its costs.
Option C — Direct integration (developer)
Your server sends a POST request to the Graph API's /{dataset-id}/events endpoint with your access token. Follow Meta's Get Started guide for the exact payload. At minimum each event needs:
event_name— e.g.Lead,Purchaseevent_time— Unix timestampaction_source— e.g.websiteevent_id— the same ID as the pixel event, for deduplicationuser_data— hashed identifiers (email, phone, name) plusfbp,fbc, client IP, and user agentcustom_data— value, currency, and other event details
Customer identifiers must be normalized and SHA-256 hashed per Meta's customer information parameters — the same data that drives your Event Match Quality score.
Step 4: Send events with a shared event ID
However you send, the golden rule is deduplication. Fire the browser pixel and the server event for the same action, giving both the same event_id and event_name. Meta matches the pair and counts the conversion once — you get the coverage of CAPI with no inflated numbers.
Step 5: Test with the Test Event Code
- In Events Manager, open your dataset and go to the Test Events tab.
- Copy the Test Event Code.
- Include that code in your server payload (or trigger a test through your integration).
- Watch the event appear in Test Events in real time.
If nothing shows up, check that you're hitting the right dataset, your access token is valid, and the test event code is present.
Step 6: Verify quality and deduplication
Once live, don't just assume it works:
- Event Match Quality: aim for 6+, ideally 8+ on key events. Low scores mean you're not sending enough matched parameters.
- Deduplication: confirm Events Manager shows your pixel and server events being merged, not double-counted.
- Diagnostics: clear any warnings Meta surfaces about missing or malformed parameters.
The 5-minute way for lead forms: Collectform
Wiring CAPI by hand, a server endpoint, SHA-256 hashing, fbp/fbc capture, deduplication, and testing, is real work. For lead-generation forms, Collectform removes it.
You keep your landing page and funnel; Collectform is the lead-gen form you embed into it, and it sets up CAPI for that form's lead events in about five minutes:
- Add your Collectform lead form to the page you already have.
- In the form's Integrations tab, paste your Pixel ID and access token.
- Map your fields email, phone, name to Meta's matching parameters.
From there it sends events server-side to Meta CAPI (and TikTok's Events API), captures _fbp / _fbc, hashes everything to spec, and deduplicates against the pixel automatically. No cloud gateway to host, no server code to maintain — just clean, server-side lead events from the form you embedded.
Common setup mistakes
- Exposing the access token in browser code instead of keeping it server-side.
- No shared event ID, which double-counts pixel and server events instead of deduplicating them.
- Sending unhashed PII, or hashing
fbp/fbc/IP (those are sent raw) — either way the events won't match. - Skipping Test Events and discovering weeks later that nothing landed.
- Turning off the pixel once CAPI is live — Meta wants both, running together.
The bottom line
Setting up the Facebook Conversions API comes down to five things: get your Pixel ID, generate an access token, choose a sending method, send events with a shared event ID so they deduplicate, and test in Events Manager. Developers can integrate directly; most teams are better off with a no-code partner integration or Meta's Gateway.
And if the events you care about are leads, you don't have to build any of it, embed a Collectform lead form into your existing page, paste your Pixel ID and token, and CAPI is live in about five minutes.
Explore lead templates or start building for free with Collectform →
