How to set up the Meta pixel and Conversions API for leads
Live guide · Checked 28 October 2026 · Updated 28 October 2026 · Checked every week against Meta's own help pages
Create a Meta dataset (pixel), track leads and checkouts from your site, and add the Conversions API so Meta still sees leads when browsers block it.
- Time
- 40 minutes
- You will need
- A Meta business portfolio (business.facebook.com) with admin access
- Google Tag Manager on your site, or a pixel setting on your platform
- Access to your server or a platform that supports the Conversions API
- Stuck?
- Troubleshooting or ask us a question
Step by step
Open Events Manager
Go to
https://business.facebook.com/events_managerand choose your business portfolio.Create a dataset
Click Connect data sources, choose Web, name your dataset (this is your pixel) and click Create. Copy the dataset ID, a long number.
Add the pixel to your site
Paste the dataset ID into your site's Meta pixel setting, or add it with Tag Manager. The pixel sends PageView on every page by itself.
Track leads
Send the standard Lead event when a form is sent, and InitiateCheckout when someone clicks through to pay. Use Meta's standard names exactly so Meta can optimise for them.
Test the events
In Events Manager open Test events, enter your site address and press Open website. Send a test lead and check Lead appears.
Set up the Conversions API
In the dataset's Settings, find Conversions API and generate an access token. Give it to your server or platform, so it sends the same events from the server.
Match the two with an event ID
Send the same
event_idwith the browser event and the server event for each lead. Meta then counts it once (this is called deduplication).Check event match quality
After a day, open Overview and look at Event match quality. Sending a hashed email and phone with server events usually lifts it to 6 or more out of 10.
Tips from people who set these up every week
- Keep the access token somewhere safe: it lets anyone send events into your dataset.
- Use the Test events code while testing so test leads do not train your campaigns.
- If you run Meta ads for leads, optimise for the Lead event, not Link clicks.
Troubleshooting: questions and answers
Events Manager shows the same lead twice.
The browser and server events have different or missing event_id values. Send the same ID with both.
The pixel is not firing.
Check your cookie bar: if the visitor declines, the pixel will not load. Test after accepting cookies, with ad blockers off.
Event match quality is low.
Send more customer details with the server events: hashed email, phone, and the fbp and fbc cookies. Never send them unhashed.
Official help pages
Let Claude fix the rest of your funnel
Lead Focus is 12 Claude Skills that find the stage of your funnel that's costing you leads, then fix it: ads, landing pages, follow-ups and tracking. One payment, free updates, and a 14-day refund.
Get Lead Focus · $29.99Still stuck, or have a question?
Tell us where you got to and what you see. We read every message and reply by email, usually the same working day.