You enabled the Facebook Conversions API alongside your existing Meta Pixel, opened Events Manager the next morning, and your Purchase count had nearly doubled. ROAS looks incredible. Revenue in your store did not move at all. Something is wrong, and it is one of the most common mistakes in server-side tracking: broken deduplication.
This guide explains exactly how Meta deduplication works, the specific ways it breaks, how to confirm whether you have the problem, and how to fix it permanently with a single shared event_id.
The Symptom: Your Purchase Count Just Doubled
When you run the Pixel and the Conversions API (CAPI) together - which is the setup Meta recommends - every purchase can reach Meta twice: once from the browser Pixel, once from your server’s CAPI call. If Meta cannot tell those two reports are the same purchase, it counts both. Your numbers inflate, your cost per result looks artificially low, and your campaigns start optimizing against fiction.
This matters immediately, not eventually. Budget decisions made on a 2x inflated conversion count lead to overspend with no return, and Meta’s delivery algorithm learns from corrupted signal.
There is a second source of confusion worth naming up front, because merchants constantly conflate the two:
- CAPI recovers conversions that the browser Pixel loses to ad blockers, Safari ITP, and consent friction. This pushes your reported conversions up.
- Deduplication removes double-counts. This pushes your reported conversions back down toward the true number.
When you fix deduplication correctly, your reported conversions will drop. That is the system working, not breaking. We will come back to this, because it is the single most misread signal in this whole process.
How Meta Deduplication Is Supposed to Work
The two fields that matter - and only two
Meta deduplicates redundant events using exactly two fields: event_name and event_id. When a browser Pixel event and a CAPI server event share an identical event_name and an identical event_id, and they arrive within the deduplication window, Meta counts the conversion once and discards the duplicate.
That is the whole rule. Meta’s PHP Business SDK states it directly:
For deduplication, the eventID from Facebook pixel must match the event_id in the corresponding Server-Side API event.
A critical correction here, because several popular guides get this wrong: no other field participates in the deduplication match. Not email, not phone, not fbp, not fbc, not external_id. Those parameters drive user matching (Event Match Quality), which is a completely separate system from event counting. If a guide tells you fbp is a deduplication key, it is mistaken.
The camelCase vs snake_case trap
This one breaks nearly every manual integration. The browser Pixel and the server API spell the field differently:
// Browser Pixel - fourth argument, camelCase "eventID"
fbq('track', 'Purchase',
{ value: 99.99, currency: 'USD', content_ids: ['SKU-001'], content_type: 'product' },
{ eventID: 'ORDER-12345' }
);
// CAPI server payload - snake_case "event_id"
{
"event_name": "Purchase",
"event_time": 1717322400,
"event_id": "ORDER-12345",
"action_source": "website",
"event_source_url": "https://yourstore.com/order/12345",
"user_data": { "client_user_agent": "...", "em": "<sha256-hashed-email>" },
"custom_data": { "value": 99.99, "currency": "USD" }
}
Same value, two different field names: eventID in the browser, event_id on the server. Put it in the wrong place - for example, inside the Pixel’s third argument instead of the fourth - and the Pixel quietly logs a console warning while sending no usable dedup key at all.
Which event “wins”
Meta keeps the first event it receives and drops the later duplicate, regardless of action_source. In a normal real-time setup the browser Pixel fires in milliseconds while the server event takes a network round-trip, so the browser event is usually the one counted. This is a timing reality, not a documented preference for the browser.
The important consequence: if the browser event never arrives - blocked by an ad blocker or stripped by ITP - and only the CAPI event comes through, then the server event is counted. That is precisely why a deduplicated redundant setup gives you both breadth (you catch blocked conversions) and accuracy (you never count one twice).
Deduplication is not Event Match Quality
Keep these two separate in your head for the rest of this article:
- Deduplication controls how many times a conversion is counted.
- Event Match Quality (EMQ) controls how accurately Meta ties that conversion to a known user, scored 0-10 from
user_dataparameters.
You can have perfect deduplication and a terrible EMQ score, or a great EMQ score with badly broken deduplication. Fixing one does nothing for the other.
Two Types of Double-Counting: Diagnose Before You Fix
Before you touch any code, figure out which of two structurally different problems you have. They look identical in your reports but require opposite fixes.
Type A - One Pixel ID, two pipes
The same Pixel/Dataset receives both a browser event and a server event for the same purchase, but they carry different event_id values, or one side is missing event_id entirely. This is the classic deduplication failure, and it is fixable by sharing a single event_id across both calls.
Type B - Multiple independent Pixel IDs
Two or more separate Pixel IDs are both firing for the same store. No event_id coordination can fix this, because two different Pixels have no deduplication relationship with each other. You have to find and remove the duplicate installation.
On Shopify this is rampant. A single store can be firing the same Purchase from several places at once:
- The native Facebook & Instagram Sales Channel
- A Pixel snippet pasted into
theme.liquid - A Google Tag Manager container
- Customer Events in Settings
- Legacy code still living in Checkout “Additional Scripts”
A third-party CAPI app that adds a server layer for one Pixel ID cannot deduplicate against browser events coming from a different Pixel ID. That is the most common Shopify scenario of all.
How to tell them apart: Type A shows one Pixel ID receiving both browser and server events with a near-zero deduplication rate. Type B shows multiple Pixel IDs in Data Sources all receiving traffic from the same domain.
Seven Ways Deduplication Breaks
Assuming you have confirmed a single Pixel ID (Type A), here are the failure modes, in rough order of how often they bite:
-
event_idgenerated independently on each side. The browser mints a random UUID at page load; the server mints a different UUID at order processing. Two strings, no match. Fix: generate the ID in one place and pass it to both sides. -
event_idmissing on one side. Iffbq()omits the fourth argument, or the CAPI payload omitsevent_id, there is nothing to match on. Per Meta’s developer community, event instances sent without anevent_idcannot be deduplicated - full stop. Meta receives two anonymous events and counts both. -
event_idstring format mismatch. Meta comparesevent_idas a raw string with no normalization. Shopify prepends a#to order names, so#1042and1042are different strings and silently fail to match. Same forord-123versusord_123. Strip special characters and keep casing consistent. -
event_namecase mismatch. Meta’s standard events are written in PascalCase:Purchase,AddToCart,InitiateCheckout,ViewContent. A server integration sendingpurchasein lowercase will not match a browserPurchaseevent even when theevent_idis perfect. Use the exact same casing on both sides. -
event_timein milliseconds instead of seconds. CAPI expects a Unix timestamp in seconds. JavaScript’sDate.now()returns milliseconds - you must divide by 1000. Submitting milliseconds produces a timestamp thousands of years in the future, which can get the event rejected or mis-attributed. -
Wrong
action_source. Web deduplication requiresaction_source: "website"on the CAPI payload, and for web eventsclient_user_agentandevent_source_urlare required too. Sendaction_source: "app"and the event lands in a different measurement bucket where it cannot match your web Pixel. -
event_idcollision across event types. Reusing a bare order ID as theevent_idfor both thePurchaseand theAddToCartof the same order risks a cross-event collision. Scope it:purchase_12345for the purchase,cart_12345for the cart.
There is one more that almost no guide mentions: retries that generate a new event_id. When a CAPI call fails and your system retries it with a freshly minted ID, Meta treats the retry as a brand-new conversion. The event_id must be stable across every retry attempt.
How subtle can this get? In one documented case on the Stape community, a store found that only 35% of its browser Pixel events carried an event_id - the other 65% came from hardcoded Pixel snippets outside GTM - while 100% of its CAPI events had one. The result was a 0% deduplication rate in production even though the IDs matched perfectly in the test environment. Partial breakage is the hardest to catch, because some of your purchases deduplicate correctly and most do not.
How to Confirm You Have a Deduplication Problem
You do not need to guess. Work through these checks in Meta Events Manager:
-
Cross-check raw counts. Compare your Events Manager Purchase count against the actual order count in your store for the same date range. A ratio close to 2:1 is the clearest possible signal.
-
Check the Diagnostics tab. Go to Data Sources → your Dataset → Diagnostics. Look for a warning along the lines of “Purchase Event from the Server are not Deduplicated.” One important caveat: even after you fix the problem, this warning can linger for several days. Do not treat its mere presence as proof the fix failed.
-
Open the event detail view. Data Sources → your Dataset → Events tab → click Purchase. The detail view shows a Deduplication rate and a Deduplication Keys section. A dedup rate near zero while both browser and server events are flowing is the definitive sign of missing or mismatched IDs.
-
Inspect Deduplication Keys coverage. In that same view, check what percentage of events actually included
event_id. If browser events show 0% coverage while server events show 100%, every browser event will fail to deduplicate. -
Use the Test Events tool. Test Events tab → add a
test_event_codeto your CAPI payload (server events do not appear here without it) → fire a test purchase. You will see each event labeled Browser or Server in real time, with its dedup status. Removetest_event_codefrom production the moment you finish - test events still flow into audience building and measurement, so leaving it in pollutes live data. -
Count your Pixel IDs. If more than one Pixel/Dataset is receiving traffic from your domain, you have a Type B problem that no
event_idcan solve.
The Fix: One event_id, Generated Once, Used Everywhere
Every reliable fix reduces to the same principle: mint a single event_id in one place, before any event is sent, and use that exact value on both the browser and the server.
For Purchase events, the platform order ID is the best source. It is unique per transaction, available both on the browser confirmation page and on the server, and stable across retries - just clean it first (strip the #, fix the casing, cast to a string):
// One ID, derived from the order, used in BOTH places
const eventId = 'ORDER-' + String(order.id); // e.g. "ORDER-12345"
// Browser Pixel
fbq('track', 'Purchase',
{ value: 99.99, currency: 'USD', content_ids: ['SKU-001'], content_type: 'product' },
{ eventID: eventId }
);
// CAPI server payload - same eventId value, snake_case field
{
"event_name": "Purchase",
"event_time": 1717322400,
"event_id": "ORDER-12345",
"action_source": "website",
"event_source_url": "https://yourstore.com/order/12345",
"user_data": { "client_user_agent": "...", "em": "<sha256-hashed-email>" },
"custom_data": { "value": 99.99, "currency": "USD" }
}
For non-purchase events (AddToCart, InitiateCheckout, ViewContent), generate a UUID server-side, embed it in the page, and have the browser read it from a data attribute rather than minting its own. That removes the GTM tag-sequencing race condition where two tags independently generate different IDs for the same event.
The rules are simple and non-negotiable:
- The value must be a string, never a raw integer.
- It must be byte-for-byte identical in the
fbq()call and the CAPI payload. event_namemust use the same PascalCase on both sides.- The ID must survive retries unchanged.
This is, not coincidentally, the same single-source-of-truth approach that Meta’s own Conversions API Gateway uses: one identifier, propagated to both channels, instead of each channel inventing its own.
How to Verify the Fix Is Working
-
Test Events first. With a
test_event_code, fire a test purchase, then open the browser event and the server event separately. Both must show an identicalevent_id, and Test Events should report the pair as deduplicated. -
Watch the dedup rate for 24-48 hours. In the event detail view, the deduplication rate should climb toward your browser-to-server event ratio. If both fire for every purchase, it should approach 100%.
-
Reconcile counts. Your processed Purchase count should now sit within normal variance of your real order count - small differences from attribution windows, privacy thresholds, and ad-blocker-recovered events are expected and healthy.
-
Ignore the Diagnostics lag. The Test Events tool and the dedup-rate metric are authoritative. The Diagnostics warning is not - it can trail a working fix by days.
And the part everyone trips on: after you fix deduplication, your reported conversions will fall. In a setup that was fully double-counting, the drop can approach half. This is the phantom inflation disappearing, not real sales vanishing. Meta’s optimization now runs on accurate numbers, which makes delivery better over time. When a stakeholder asks why conversions dropped, that is the answer: you removed inflated counts, not revenue.
How AxiTrace Solves This by Design
Every fix above is something you can do by hand. The problem is that “by hand” means a GTM web container, a server-side GTM container, custom variables, dataLayer listeners, and exact tag sequencing - a configuration surface where a single mistake silently reintroduces double-counting (recall the real 35%-coverage failure above).
AxiTrace removes that surface entirely:
- A single 11KB browser SDK sends each event to the AxiTrace server, which mints one
event_idat ingestion, before anything is forwarded. - That same ID is used for both the browser Pixel event and the server-side CAPI call AxiTrace sends - correct
eventIDin the browser, correctevent_idon the server, automatically. Failure modes 1, 2, and 7 simply cannot occur, because you never generate the ID yourself. - The
event_idis preserved across CAPI retries, since it is minted once and stored before the first send. No silent retry-floods. - PII is SHA-256 hashed server-side before submission, with advanced-matching parameters sent on every event - improving Event Match Quality independently of deduplication. (See our Conversions API and Event Match Quality explainers.)
- The same
event_idprinciple is applied across Meta CAPI, TikTok Events API, Google Ads, and GA4 - each with the correct field name for that platform - from one ingestion point. - Native plugins for Shopify, WooCommerce, Magento, and Shopware replace the multiple-Pixel chaos that causes Type B double-counting with one canonical source of truth.
If you want the background on why server-to-server tracking is non-negotiable in the first place, start with Why Server-Side Tracking Matters in 2026.
Getting Started
- Install the plugin for your platform - Shopify App Store, WordPress.org, or Packagist for Magento and Shopware.
- Connect your Meta Pixel ID and CAPI token in the AxiTrace dashboard.
- The SDK handles
event_idgeneration, PII hashing, and forwarding - there is no deduplication setting to misconfigure. - Verify in Events Manager → Test Events within minutes of installation.
The free tier covers 10,000 visits per month, which is more than enough to confirm correct deduplication before you commit to a paid plan. The real-time dashboard shows which events reached Meta, TikTok, and Google Ads, so you can watch deduplication working without leaving AxiTrace. Meta is one of 9 destinations: the same order, with one deduplicated ID per platform, also goes to Google Ads, TikTok and the rest through one Conversions API for every ad platform you connect.
Frequently Asked Questions
What exact fields does Meta use to detect duplicate events?
Exactly two: event_name and event_id. Both must be identical on the browser Pixel event and the CAPI server event. No other field - not email, phone, fbp, fbc, or external_id - is part of the deduplication match; those drive user matching (Event Match Quality), not event counting. Meta’s PHP Business SDK puts it plainly: “the eventID from Facebook pixel must match the event_id in the corresponding Server-Side API event.”
My conversions dropped 40% after I fixed deduplication - did I break my tracking?
No. The drop is phantom double-counts being removed, not real conversions disappearing. Before the fix, each purchase was reported twice; with a shared event_id, Meta counts it once. Your numbers are now accurate, and Meta’s optimization improves because it is learning from real data. The correct explanation for any stakeholder is: we removed inflated counts, not sales.
Do I need deduplication if I use Shopify’s native Meta integration plus a separate CAPI app?
Yes - and that combination is one of the most common causes of the problem. Shopify’s native channel fires browser events with its own event_id values while the CAPI app generates its own. Unless the app explicitly forwards Shopify’s Pixel event_id, Meta sees two non-matching IDs per purchase and counts both. Check Events Manager → Diagnostics for the “not Deduplicated” warning.
What is the deduplication time window?
The figure documented consistently across implementation guides is 48 hours from the first event received; events further apart are counted separately. In a real-time setup this is never the constraint - it only matters for batched or delayed CAPI sends such as nightly reconciliation jobs. (Note: there is also a separate ~7-day window governing whether Meta accepts an event at all, which is a different thing.)
Does the same concept apply to TikTok and Google Ads?
Yes, with differences. TikTok’s Events API also uses event_id within a 48-hour window but requires a minimum 5-minute gap between the Pixel and Events API events before dedup applies, keeping the first received. Google Ads and GA4 deduplicate purchases on transaction_id rather than event_id, and Google does not publish a specific time window. A tool like AxiTrace mints one identifier at ingestion and applies the right field name for each platform automatically.
Does fixing deduplication improve my Event Match Quality score?
Not directly - they are independent systems. Deduplication controls how many times a conversion is counted; EMQ (scored 0-10) controls how well Meta matches it to a known user via user_data. You can have flawless dedup with a low EMQ, or a high EMQ with broken dedup. Both need to be set up correctly, and fixing one does not fix the other.
Does event_id have to be a UUID?
No. Meta accepts any unique string - no UUID requirement, length limit, or character-set constraint. For Purchase events the order ID is the simplest reliable choice. Just make sure it is a string (not an integer), byte-for-byte identical on both sides, stripped of any # prefix, and scoped per event type if you reuse it across event names (purchase_12345 vs cart_12345).
Get tracking insights in your inbox
Tips on server-side tracking, conversion optimization, and product updates. Delivered weekly.
No spam. Unsubscribe anytime.