Meta Deduplication: How to Use event_id With Pixel and CAPI
How Meta deduplication works: matching Pixel and Conversions API events with event_id, the 48-hour rule, a GTM setup and checks in Events Manager.
Meta deduplication (event deduplication) is how Meta counts the two copies of the same user action, one from the Meta Pixel and one from the Conversions API, as a single event. For this to work, both events must carry the same event name and the same event_id. On the Pixel side, this ID is called eventID and goes into the fourth argument of the fbq call.
In this post I explain how deduplication works, which value to choose as the event_id and how I set it up with Google Tag Manager. In the last section I share how I verify the setup in Events Manager.
Why are Pixel and Conversions API events double counted?
Pixel and Conversions API events are double counted because the same action reaches Meta through two separate paths and Meta cannot link the two copies. Meta recommends using the Conversions API alongside the Pixel for the best ad performance and calls this structure a “redundant setup”.[1] The same document states clearly that advertisers using a redundant setup must set up a deduplication method.
The logic behind a redundant setup is simple. The Pixel in the browser misses some events because of ad blockers, pages closing early or cookie consent. The server sees the definitive record of the order or submission. Together, the two sources give a more complete picture. But when both sources work, the same sale arrives twice.
Without deduplication, the result shows up directly in reports. The purchase count in Ads Manager looks noticeably higher than the order count in the store dashboard. ROAS looks better than it is, and the bidding algorithm is fed conversions that never happened. Meta also notes that advertisers who do not send the same event through both sources do not need to set up deduplication for those events.[1]
How does Meta deduplication work?
Short answer
How does Meta deduplication work?
Meta compares the eventID and event name in the browser event with the event_id and event_name in the server event. When both values match for events sent to the same Pixel ID within 48 hours, it discards the later event. If the events do not differ meaningfully in content, Meta generally prefers the one received first.
Meta’s deduplication documentation defines two methods and recommends the first.[1] Both methods compare the same kind of thing: a browser event with a server event. They differ in which field they use as the key and in which order they work.
Event name + event_id (recommended)
- The Pixel's eventID and the server's event_id carry the same value
- Event names match exactly
- The order in which events arrive does not matter
- Works within the 48-hour window
Event name + fbp or external_id
- The same fbp or external_id is sent on both sides
- Event names match exactly
- Generally works only when the browser event arrives before the server event
- Does not discard consecutive events from a single source
Rules of the event_id method
According to Meta’s documentation, two conditions are needed for an event to be deduplicated. The Pixel’s eventID must match the Conversions API’s event_id. The Pixel’s event name must also match the Conversions API’s event_name.[1] Both conditions apply to events sent to the same Pixel ID.
Timing is part of the rule too. If Meta sees the same key pair within 48 hours, it discards the subsequent events. The server event parameters documentation adds one more detail: if a server event and a browser event arrive at approximately the same time, within 5 minutes of each other, Meta favors the browser event.[2]
Limits of the fbp and external_id method
In the second method, Meta compares the event name together with the fbp and/or external_id value. The limit of this method matters. According to Meta, it generally works only when the browser event arrives first and the server event second.[1] If no browser event has been received in the past 48 hours, the server event is not discarded, even if the browser event arrives later.
The same document also states that this method does not deduplicate when only one source is used. Two consecutive browser events or two consecutive server events are both kept, even if they carry the same information.[1] That is why I send fbp and external_id with every event for match quality, but leave deduplication to event_id.
Which value should be used as the event_id?
The event_id should be a value that is the same in the browser and on the server for one action, and that never repeats across different actions. Meta’s server event documentation gives the order number or transaction ID as good examples.[2] For instance, orders 123 and 456 are sent with two different event_id values, and Meta separates them as two distinct purchases.
My choice by event type:
| Event | event_id source | What to watch |
|---|---|---|
| Purchase | Order number | If the thank-you page is reloaded, the Pixel fires again with the same number; deduplication catches it |
| Lead | UUID generated at form submission | The same UUID must be written into both the fbq call and the request to the server |
| InitiateCheckout | Cart or checkout session ID + timestamp | If the user enters checkout twice, there may be two separate events |
| Later events from the CRM | CRM record ID + stage name | No deduplication needed without a Pixel counterpart; the ID should still be unique |
crypto.randomUUID() is enough to generate a UUID in the browser. This function is built into modern browsers (MDN documentation). The real work is carrying the generated value to the server without losing it.
How do you set up Pixel and CAPI deduplication?
Short answer
How do you set up Pixel and CAPI deduplication?
Pixel and CAPI deduplication is set up by generating one ID for each action and sending it as eventID in the Pixel and as event_id in the Conversions API. The event name must also be exactly the same on both sides. After setup, the match is verified in Events Manager with a single test event.
- Generate one unique ID for each conversion action.
- Write the ID to the dataLayer or the order record.
- Add the ID to the Pixel call as eventID in the fourth argument.
- Write the same value into the event_id field of the server event.
- Keep the event name exactly the same on both sides.
- Verify the match with a single test event in Test Events.
On the Pixel side, eventID is the optional fourth argument of the fbq call.[1] If the event carries no parameters such as value and currency, the third argument is left as an empty object:
// Purchase: the order number is used as the eventID
fbq('track', 'Purchase', { value: 1250, currency: 'TRY' }, { eventID: 'order-10482' });
// Lead: with no parameters, the third argument is an empty object
fbq('track', 'Lead', {}, { eventID: leadEventId });
// To send to only one Pixel when several are on the page
fbq('trackSingle', 'PIXEL_ID', 'Purchase', { value: 1250, currency: 'TRY' }, { eventID: 'order-10482' });
In setups that use an image pixel, the same value is passed with the eid parameter.[1] On the server side, the same value goes into the event’s event_id field:
{
"data": [{
"event_name": "Purchase",
"event_time": 1763640000,
"event_id": "order-10482",
"action_source": "website",
"event_source_url": "https://example.com/thank-you/",
"user_data": { "em": ["<sha256>"], "fbp": "fb.1.1763639000000.123456789", "client_user_agent": "…" },
"custom_data": { "value": 1250, "currency": "TRY" }
}]
}
If you work with Google Tag Manager, the flow is usually set up as follows. I build these setups with a web container and server-side GTM together:
- Push the ID to the dataLayer
On the order or form submission event, add the event_id value to the dataLayer. Use the order number for purchases and a UUID generated at submission time for forms.
- Create a variable in the web container
Define a Data Layer Variable for event_id in the dataLayer. Feed this variable from one place only; do not generate a separate ID inside the tag.
- Give the Pixel tag an eventID
Bind this variable to the eventID field in the Meta Pixel tag or custom HTML code. Write the event name exactly as the standard event name.
- Carry the same value to the server container
Send an event_id parameter in the GA4 or custom request going to the server. Map this parameter to the event_id field in the Conversions API tag in the server container.
- Align the event names
If the browser sends Purchase, send Purchase from the server too. Even if the GA4 event name is purchase, convert it to the standard Meta name in the Meta tag.
- Test it
Place a test order in Test Events. Check that the browser and server copies of the same event merge into one event.
The built-in Meta integrations of Shopify and similar platforms usually generate the ID themselves. In that case, a second Pixel or a manually added server tag creates double counting, because it does not know the integration’s ID. The first step is to list which sources on the site send the same event.
How do you check whether deduplication is working?
Deduplication is checked in the Event Deduplication tab on the event’s details page in Events Manager. According to Meta’s verification documentation, this tab shows two things: the rate of events deduplicated from each source and the usage rate of each deduplication key.[3] A warning also appears when the deduplication rate is too low.
The Overlap value in the same tab is the share of events with a given key received from both the browser and the server. Meta calculates it as a percentage of the source with fewer events received. Low overlap points to one of two things: one or both sides send non-unique keys, or the key comes from only one source.[3]
When checking, I make these distinctions:
- Overview counts: According to Meta’s documentation, the event count in Overview is the raw number before events are deduplicated or discarded for policy reasons.[3] This number being higher than the order count is not a problem on its own.
- Time for events to appear: Meta says sent events can be verified in Events Manager within about 20 minutes.[3] Reading a test result earlier can be misleading.
- Delayed server events:
event_timecan go back up to 7 days, but the deduplication window is 48 hours.[2] If a batched server event falls between these two limits, the copy may be counted as a separate event.
What are the most common deduplication mistakes?
The most common deduplication mistake is the two sides sending a different ID or a different event name. Most of these mistakes appear not during setup but after a later site or tag change. These are the typical cases I run into:
- Case mismatch: The browser sends
Purchaseand the server sendspurchase. Because the event names do not match, the two copies are counted separately. - A new ID per tag: The ID is generated inside the tag, and the browser and server get different values.
- A fixed or empty ID: Every event goes out with the same
event_id. In that case Meta may count different orders as one event, and conversions look lower than they are. - Turning off the Pixel: The Pixel is removed entirely to fix double counting. This breaks the redundant setup Meta recommends and loses browser signals.
- A new ID on retry: A failed server request is resent with a new
event_id. A retry should always reuse the original ID.
Every server event that carries patient or customer data must follow KVKK (Turkey’s personal data protection law), regardless of the deduplication setting. Fields such as email and phone should be hashed with SHA-256, and the privacy notice and, where needed, explicit consent process should be complete. Tying Pixel firing to cookie consent is also part of a Consent Mode v2 and consent management setup.
Conclusion
Meta deduplication is the step a redundant setup needs in order to count correctly. The rule is short: for the same action, the same event name, the same event_id on both sides and a gap of less than 48 hours. If this rule is not met, using the Pixel and the Conversions API together inflates ROAS instead of improving measurement.
If you are just starting the setup, first review the basic structure in the Meta Conversions API post, then the event settings in the Meta Pixel setup guide. Once deduplication is in place, the next step is raising your Event Match Quality score. For the wider framework of server-side measurement, see the server-side tracking post and the performance marketing service where I handle this work.
Key terms
- event_id
- event_id is an identifier the advertiser assigns to a Conversions API event to uniquely describe one action. If the Pixel's eventID matches the server's event_id and the event names match, Meta counts the two copies as one event. For purchases, the order number is commonly used.
- Redundant setup
- Redundant setup is a measurement structure in which the same events are sent both by the Meta Pixel in the browser and by the Conversions API from a server. Meta recommends this structure; however, copies arriving from both sources need a shared key to be deduplicated.
- Deduplication key
- Deduplication key is the combination of fields Meta compares to decide that a browser event and a server event describe the same action. The recommended key is the pair of event name and event_id; event name with fbp or external_id is an alternative.
Frequently asked questions
What is Meta deduplication?
Meta deduplication is how Meta counts the two copies of the same user action, one from the Meta Pixel and one from the Conversions API, as a single event. Meta checks whether both events carry the same event name and the same event_id value. Of the matching copies, it generally keeps the one received first.
What should I use as the event_id?
For purchases, Meta suggests a value that never repeats, such as an order number or transaction ID. For form and lead events, a UUID generated at submission time and passed identically to the browser and the server works well. What matters is that the value is exactly the same on both sides and unique for each action.
Does Meta deduplicate two server events?
Meta's deduplication documentation describes merging copies between the Pixel and the Conversions API. For the fbp or external_id method, it states clearly that two consecutive events from the same source are not discarded. That is why a server-side retry should never resend the same event with a new ID.
How long does the deduplication window last?
Meta deduplicates matching events received within 48 hours of the first event it receives with a given event_id. A copy that arrives outside this window may be counted as a separate event. Setups that send server events days later face a higher risk of double counting because of this limit.
How can I tell whether deduplication is working?
In Events Manager, the Event Deduplication tab on an event's details page shows how many events from each source were deduplicated and which deduplication key they carried. A low Overlap value suggests the key is missing or inconsistent on one side. You can also check with a single test order in the Test Events tool.
Sources
The full topic: Meta Ads guide ↗ · Tracking guide ↗