Here’s how to set up Meta’s Conversions API (the Facebook Conversions API, as many still call it) for lead generation, in five steps:
- Pick a setup method: Meta-enabled, partner, Gateway or direct.
- Get your Pixel ID and an access token from Events Manager.
- On form submit, send a Lead from your server with an
event_id, hashed email and phone,fbc,fbp, IP and user agent. - Check the event in Test events.
- Confirm deduplication and Event Match Quality.
This guide is the procedure, written for advertisers whose leads come from a form on a landing page. For what server-side tracking fixes, and what it can’t, read server-side tracking for Facebook ads; for where tracking sits in the whole funnel, see the Facebook ads for lead generation playbook.
Meta Conversions API setup options
There’s more than one way to get events into the Conversions API. Meta’s help article comparing Conversions API setup options lists three routes, and Meta for Developers documents a fourth, the Conversions API Gateway. All four are live as of November 2026. For lead gen, the last column is the one to read:
| Option | What it sends | What it takes | A Lead the Pixel never fired |
|---|---|---|---|
| Meta-enabled Conversions API | the same events and parameters the Pixel shares, web only, deduplicated automatically | one click in Events Manager, free; needs the Pixel | lost |
| Partner integration | whatever the partner sends: commerce platforms (Shopify, WooCommerce, Wix, BigCommerce), tag platforms (Adobe, Google Tag Manager, Tealium), CRM partners | a few clicks on a commerce platform, at no extra cost; elsewhere it depends on the partner | depends on whether the partner sends from a server that saw the form |
| Conversions API Gateway | Pixel events relayed through a server you host, with an event_id generated for deduplication | no code; your own AWS or Google Cloud account, and its fees | lost |
| Direct integration | any event and parameter you choose, from web, app, offline, CRM and messaging sources | a developer; Meta estimates 2 to 4 weeks for a new integration | sent, by the server that received the form |
Meta’s developer docs call the first option “Conversions API with Meta”. It’s the same thing: you switch it on in Events Manager and there’s nothing to host.
Which setup should a lead gen advertiser choose?
Ask where the Lead exists. On a landing page, the form submission reaches a server whatever the browser does. The Pixel’s copy exists only if the Pixel script loaded and ran. Two of the four options start from the Pixel: the Meta-enabled option shares what the Pixel shares, and the Gateway relays what the Pixel sends it. When the Pixel is blocked, neither has anything to forward.
What I’d pick:
- Your form posts to a backend you control: a direct integration. The server that saves the lead also reports it to Meta, so every lead gets sent, blocked Pixel or not.
- Your landing pages run on a platform with a Meta partner integration: use it, then confirm in Test events that the Lead arrives as a server event with an
event_id. - No developer, Pixel already installed: turn on the Meta-enabled option today. It’s free and gives Meta a server copy of everything the Pixel sees, which beats nothing.
- The Gateway suits teams that want server redundancy across several domains or Pixels without writing code, and that are happy to run cloud infrastructure. For a single lead gen landing page it adds a hosting bill without solving the blocked-Pixel case.
How to set up the Conversions API, step by step
The steps below assume a direct integration, or a tool that runs one for you. The checks in steps 4 and 5 apply to every method.
Step 1: Get your Pixel ID and an access token
Pixel ID. Use the same Pixel for browser and server events, as Meta’s get started guide asks. Events Manager lists it under Data sources. Newer Meta tools call it a dataset: the Dataset Quality API takes a dataset_id that it describes as the ID of the dataset (Pixel), so it’s one number with two names.
Access token. Meta recommends generating it in Events Manager:
- Choose the Pixel you want to set up.
- Open the Settings tab.
- In the Conversions API section, click Generate access token under Set up manually, and follow the pop-up.
The link is visible only to users with developer privileges for the business, which is the usual reason people can’t find it. If you already run your own app and system user, you can generate the token in your business settings instead: assign the Pixel to the system user, select it and click Generate Token. Meta says neither route needs App Review or extra permissions, and tokens generated since v12.0 work with every available Graph API version.
Keep the token on the server, in an environment variable or a secrets store. It never goes in the landing page’s JavaScript. Agencies: one Pixel and one token per client, and make sure the server sends each client’s leads to the same Pixel ID the browser uses on that client’s landing pages.
Step 2: Build the Lead event payload
Events go in a POST to:
https://graph.facebook.com/{API_VERSION}/{PIXEL_ID}/events?access_token={TOKEN}
The body holds a data array of up to 1,000 events, according to Meta’s guide to using the API. For a lead gen landing page you’ll normally send one Lead per request, the moment the form arrives.
Example: a Lead from a quote form, sent by the server on 4 November 2026 at 10:15:02 UTC. The two hashes are the SHA-256 of [email protected] and 393471234567.
{
"data": [
{
"event_name": "Lead",
"event_time": 1793787302,
"event_id": "lead_8c1f4e2a-7b3d-4f0e-a6c9-2d5b7e9f1a30",
"action_source": "website",
"event_source_url": "https://quote.example.com/boiler-service",
"user_data": {
"em": ["10928b45363b7d849e040470c3277657f8177ef5a953a092b4302f149757a02e"],
"ph": ["75565655f639ba28fbb0a88254e0d01fad0a351049bde96a286e336219a33e5f"],
"fbc": "fb.1.1793787151204.IwAR2F4-dbP0l7Mn1IawQQGCINEz7PYXQvwjNwB_qa2ofrHyiLjcbCRxTDMgk",
"fbp": "fb.1.1793787151880.1684203391",
"client_ip_address": "2001:db8:85a3::8a2e:370:7334",
"client_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
}
}
]
}
Field by field, with the rules from Meta’s server event and customer information references:
| Field | Required? | Value for a landing page Lead | Hash it? |
|---|---|---|---|
event_name | yes | Lead, spelled exactly as on the Pixel | no |
event_time | yes | Unix time in seconds, GMT, when the form was submitted; no more than 7 days old | no |
event_id | recommended | one ID per lead, the same string the Pixel sends as eventID | no |
action_source | yes | website | no |
event_source_url | yes, for website events | the URL of the landing page where the form was submitted | no |
user_data.em | user_data needs at least one field | the email, trimmed and lowercased | yes, SHA-256 |
user_data.ph | optional | digits only, country code included | yes, SHA-256 |
user_data.fbc | optional | the _fbc cookie, or a value built from the fbclid | no |
user_data.fbp | optional | the _fbp cookie | no |
user_data.client_ip_address | optional | the visitor’s IP, from the request that submitted the form | never |
user_data.client_user_agent | yes, for website events | the visitor’s user agent, from the same request | no |
Three things trip up first integrations:
- Hash only what Meta says to hash.
emandphget normalised, then hashed;fbc,fbp, the IP and the user agent go in clear. Meta’s Business SDKs hash for you. If you write your own code, test it against the expected outputs in Meta’s reference; the Event Match Quality guide has the normalisation rules with worked examples. - Use the visitor’s IP and user agent, not your server’s. Behind a proxy or CDN, read them from the forwarded headers your infrastructure sets, on the request that submits the form.
- Don’t send a Lead that carries only weak data. Meta’s best practices treat an event as invalid if its customer information is only a broad combination such as
fn+geordb+client_user_agent. A lead form collects an email and a phone number, so send them.
Step 3: Send the event when the form arrives
The flow for a form on a landing page:
- On the visit, read the fbclid from the landing page URL and keep it with the click. If there’s no
_fbccookie, buildfbcfrom it; _fbc and _fbp cookies, explained has the format. - On submit, generate one
event_id, fire the Pixel’s Lead with it aseventID, and post the same ID to your server with the form fields. - On the server, save the lead, then call the Conversions API straight away with that
event_id. Meta recommends sending events as soon as they occur, ideally within an hour, and rejects the whole request if any event in it is more than 7 days old. - On failure, retry with the same
event_id. Meta keeps only the first copy of anevent_nameandevent_idpair, so a retry can’t create a second lead.
Where the ID should come from, and every way the pairing breaks, is in Meta Pixel and CAPI deduplication.
If your landing pages run on DropCPL, this part is already wired. DropCPL logs the click on the domain that serves your landing page and sends the Lead to Meta server-side through the Conversions API, with an event_id for deduplication plus fbc and fbp. Start free →
Step 4: Test the event with Test events
- In Events Manager, open Data sources, choose your Pixel and open the Test events tab.
- Copy the test code and add it to the request body as
test_event_code, at the top level, next todata. - Submit the form on your live landing page with your own email and phone. Meta’s best practices suggest real details, because test events that don’t match a Meta account may be discarded.
- Check that the server Lead arrives with the parameters you expect, and that its browser copy shows as deduplicated.
- Remove
test_event_codebefore you go live.
One detail catches people out: Meta says events sent with test_event_code aren’t dropped. They flow into Events Manager and are used for targeting and measurement, so your test lead is a real Lead as far as Meta is concerned. Keep the tests few. If nothing shows up, compare your request with what Meta’s Payload Helper generates for the same fields.
Step 5: Check deduplication and Event Match Quality
Once you’re live, Meta’s guide to verifying a setup points to four places in Events Manager:
- Overview. Server events should appear within 20 minutes of being sent. The count there is taken before deduplication, so a jump after launch is expected.
- Event Deduplication tab, in the Lead event’s details: the rate of events deduplicated, and how much the Pixel and server overlap. Meta reads low overlap as a sign of keys that aren’t unique or that only one side sends; in practice it’s often a browser ID and a server ID that were never the same string. The deduplication guide explains how to read it.
- Event Match Quality. Meta recommends aiming for 6.0 or higher where possible. Read the Lead’s score, not the PageView’s; Event Match Quality for lead generation covers what moves it and how long it takes to update.
- Event freshness. It shows the average delay between
event_timeand arrival. A Lead that reaches Meta hours late points at a queue, not at matching.
Conversions API Gateway setup
If you chose the Gateway, Meta’s setup guide runs like this:
- In Events Manager, open the Settings tab and click Get started under Set up with Conversions API Gateway.
- Review the prerequisites, then pick your preferences, a cloud setup and one hosting region.
- Open AWS, or copy the URL for your AWS administrator. A quick-create stack opens with every field filled in: leave
ProvisioningDataalone and click Create stack. Meta puts the install at 30 to 40 minutes. - From the stack’s Outputs, open the
CapigSetupURL, create the admin account and log in. - Wait for data. Meta says server and browser counts can take 5 minutes to 2 hours to populate.
- Add a custom domain in the Admin UI. Meta recommends it for data routing and says it may reduce costs.
Then run the Test events and deduplication checks above. Keep in mind what you’ve built: a server that forwards what the Pixel sends it. If the Pixel never fires, the Gateway has nothing to forward.
Common Conversions API setup mistakes
| Mistake | What happens | Fix |
|---|---|---|
| One event in a batch is more than 7 days old | Meta returns an error for the whole request and processes none of it | send events as they happen |
event_source_url or client_user_agent missing | the event lacks a parameter Meta requires for website events | send both with every Lead |
fbc, fbp, IP or user agent hashed | the values stop matching anything | hash contact fields only |
| Phone hashed without the country code | a valid-looking hash that matches nobody | add the country code before hashing |
| Your server’s IP sent as the visitor’s | the IP describes your server, not the person | take it from the visitor’s request |
| Pixel and server on different Pixel IDs | the two copies can’t be deduplicated | one Pixel ID on both sides |
event_time in milliseconds | Meta expects Unix seconds | divide by 1,000 |
test_event_code left in production | Meta asks for it to be removed outside testing | delete it at launch |