You turn on the Conversions API, and a few days later cost per conversion drops by half. It looks like the best week of the account. Usually it isn't: Meta is counting the same conversion twice, once from the browser and once from the server.
Key points
- The pixel and the Conversions API send the same event through two paths. Meta merges them only when both carry the same
event_idand the same event name. - A sudden efficiency gain right after turning on server-side tracking is a warning sign, not a win.
- Create the
event_idonce, on the page, and pass the same value to the pixel and to thedataLayer. - Check it in Events Manager with a test code: the same
event_idshould appear from Browser and Server.
Why double counting looks like good news
The campaign's spend doesn't change; the number of conversions it reports does. Twice the conversions for the same spend means half the cost per conversion. Optimization also starts learning from inflated counts, which is worse than the reporting problem.
How Meta deduplication works
Meta compares events from the pixel and the Conversions API. When the event name and the event_id match, it keeps one. In the pixel, the ID goes in the options object:
fbq('trackCustom', 'lead_submitted', payload, { eventID: eventId })
On the server, it goes in the event_id field of the event. With server-side GTM, the GA4 hit carries it from the browser and the Conversions API tag forwards it.
The pattern that keeps one ID
Generate the ID once, where the event is born, and hand the same value to every destination:
const eventId = 'e_' + Date.now() + '_' + Math.random().toString(36).slice(2, 10)
const payload = { ...props, event_id: eventId }
try { fbq('trackCustom', event, payload, { eventID: eventId }) } catch (e) {}
try { window.dataLayer.push({ event: event, ...payload }) } catch (e) {}
Two rules come with it: one try/catch per destination, so a failure in one doesn't silently stop the others, and no second ID generated in GTM or on the server.
How to check deduplication
- Add a Test Event Code to the Conversions API tag.
- Open Events Manager → Test events and walk the funnel in a normal browser window.
- Each conversion should show up from Browser and Server with the same
event_id. - Remove the Test Event Code and publish. A forgotten test code makes production events count as tests, which is another silent failure.
Related failures worth checking
Deduplication is one of 13 silent failure modes covered in the free field guide 13 Silent Tracking Failures. The full setup, from the page to HubSpot deal stages flowing back to Meta, is in the 4-Layer Tracking Kit.
FAQ
How does Meta deduplicate browser and server events?
When the pixel and the Conversions API send the same event with the same event name and the same event_id, Meta keeps one. In the pixel the ID goes in the eventID option; on the server it goes in the event_id field.
Where should the event_id be created?
Once, where the event is born, on the page. The same value goes to the pixel and to the dataLayer, and from there to the server. Generating it twice, in two places, is the same as not having it.
Do CRM events need deduplication?
Not with the browser, because there's no browser counterpart. They still need a stable event_id per record and stage, so a script that runs twice doesn't send the same conversion twice.