Meta only deduplicates a browser pixel event and a server event when both carry the same event name and the same event ID.
If you want to run the Meta Pixel and the Conversions API together without double counting, every event has to go out twice with matching keys. Here’s how I set that up, and the mistakes I see most often.
What Meta Needs to Match
| Parameter | Browser Pixel | Conversions API | Rule |
|---|---|---|---|
| Event ID | eventID |
event_id |
Identical value on both sides |
| Event name | Second argument of fbq() |
event_name |
Exactly the same, case sensitive, including spaces, underscores and dashes |
| External ID | external_id |
user_data.external_id |
The fallback when the event ID is missing |
Event ID
When one thing happens on your site, like a lead form submit, it creates a browser pixel event and an equivalent server event. The event ID is what tells Meta those two are a single occurrence.
In the browser it’s eventID, and it goes in the fourth argument of fbq(). If you put it in the third argument with your custom data, Meta treats it as a custom property and ignores it for deduplication.
fbq('track', 'Lead', { currency: 'USD', value: 50 }, { eventID: eventId });
On the server it’s event_id, at the top level of the event, not inside custom_data.
{
"data": [{
"event_name": "Lead",
"event_id": "3b241101-e2bb-4255-8caf-4136c566a962",
"event_time": 1732400000,
"action_source": "website",
"event_source_url": "https://example.com/contact/",
"user_data": {
"external_id": "HASHED_USER_ID",
"fbp": "fb.1.1732399000123.987654321",
"fbc": "fb.1.1732399000123.CLICK_ID",
"client_ip_address": "203.0.113.42",
"client_user_agent": "Mozilla/5.0"
}
}]
}
Event Name
Purchase and purchase are two different events to Meta. So are AddToCart and Add To Cart. The safest way to avoid drift is to pass the event name from the browser call to the server call, so it’s only typed once.
External ID
The external ID is your own ID for the visitor: a user ID, a CRM contact ID or a first party session ID stored in a cookie. It needs to be captured server-side, or sent to the server event call as a parameter, so that the pixel session and the CAPI call point to the same person.
When an event ID is missing, Meta falls back to matching on the event name plus the external ID or fbp. It’s weaker than an event ID, and it only works when the browser event arrives first, but it really must be in place. It’s the only thing protecting you when an event ID gets dropped.
Naming the Event ID
- Purchases: use the order ID. It’s unique, and both the confirmation page and the server already have it.
- Everything else: use a UUID for events like
LeadorPageView, one per event.
This is the critical piece most developers misunderstand: the UUID must be identical on the server side and the client side. If you call uuid() in the browser and again on the server, you get two different IDs and nothing is deduplicated. It has to be generated in one place and handed off to the other.
Send Server Events Through an API
For this reason I always advocate for tracking server events using an API approach. The browser generates the ID, fires the pixel, then posts the same ID and event name to a small tracking endpoint that forwards the event to Meta.
const eventId = crypto.randomUUID();
fbq('track', 'Lead', {}, { eventID: eventId });
fetch('/api/track', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
event_name: 'Lead',
event_id: eventId,
event_source_url: location.href
})
});
This keeps CAPI calls out of an application’s core logic. Engineering maintains one endpoint, and marketers can control and track events on their own, separately from engineering teams and their release schedule. I covered how to build that endpoint in my server-side event tracking guide.
Batching & the 48 Hour Window
Meta only deduplicates events that arrive within 48 hours of each other. If the pixel fires at checkout and a batch job sends the server event 50 hours later, Meta counts a second purchase.
Any batching has to finish inside that window. In practice I send CAPI events immediately, and within an hour at the most. Anything slower delays reporting and hurts attribution accuracy, even when deduplication still works.
Match Quality Is Separate
Deduplication tells Meta that two events are the same event. Event Match Quality tells you how well Meta can connect a server event to a person. You can have perfect deduplication and a poor match score.
To raise it, send these in user_data with every server event:
fbpandfbc, read from the_fbpand_fbccookies and sent as is, not hashedclient_ip_addressandclient_user_agentfrom the visitor’s request, not your server’sexternal_id, the same value the pixel sendsemandphwhen you have them, trimmed, lowercased and SHA-256 hashed
Events like PageView will always score lower than Lead or Purchase, because you rarely have an email address that early.
Common Pitfalls
| Problem | Cause | Fix |
|---|---|---|
| Duplicate purchases | The pixel and server each create their own ID, or a batch arrives after 48 hours | Use the order ID on both sides and send right away |
| Browser events missing an event ID | eventID is in the third argument, or spelled event_id or eventId |
Move it to the fourth argument with the exact casing |
| Same ID, still two events | Event names don’t match | Compare the names character by character |
| Counts don’t line up | Mismatched triggers, like a “Buy” button click paired with a payment confirmation webhook | Fire both from the same milestone. Failed payments and timing gaps will never match. |
| Double firing | Two pixels on one domain, like a native Shopify integration next to a hardcoded pixel or GTM tag with no shared IDs | One base pixel per domain |
Never disable the pixel to “fix” double counting. With both active, CAPI captures the events that ad blockers and ITP block, and the pixel captures the browser context the server can’t see.
Verifying the Fix
- In Events Manager, open your dataset and go to Test Events.
- Trigger a test conversion on your site.
- Confirm that a browser row and a server row appear with identical event names and event IDs, and that one is marked Deduplicated.
- Over the next day or two, open the event from the dataset’s Overview tab and check its event deduplication details. You want a high percentage of browser and server events carrying an event ID, and a healthy overlap between the two.
The same pattern applies to almost every other ad network, which I cover in Server-Side Tracking Event Deduplication.