“Meta says we got 212 purchases yesterday. Shopify says 109.” That is the message that usually starts this kind of project. When numbers almost double the day after Conversions API goes live, it is nearly always the same thing: deduplication is broken.
How Meta decides two events are the same
When you send an event from the browser (Pixel) and from the server (CAPI), Meta needs a way to know they are one action. It matches them using two things:
- the event name (for example
Purchase) - the event ID (
event_id)
If both match, Meta keeps one and drops the other. If the event ID is missing or different, Meta counts both. That is your double counting.
Step by step setup in GTM
- Add a unique ID variable in web GTM. Stape offers a free Unique Event ID variable template in the Template Gallery. It creates an ID from a timestamp plus a random number.
- Add it to every Meta Pixel tag. In each Pixel tag, set the Event ID field to that variable.
- Send the same ID to the server. If you use the GA4 tag to send data to sGTM, add an
event_idparameter in the Google tag settings. If you use Stape’s Data Tag, addevent_idto every Data Tag. - Read it in the server container. Create an Event Data variable with key path
event_id. - Map it in the Meta CAPI tag. Put that variable in the Event ID field of the Facebook Conversions API tag.
- Test. Open Events Manager → Test Events. Fire a test event and confirm you see both Browser and Server, marked as deduplicated.
Mistakes that break it
- A second pixel outside GTM. A Shopify app, a WordPress plugin or a hardcoded snippet keeps firing browser events with no event ID. Those can never be matched. Find and remove every extra source.
- Tag sequencing creating new IDs. If tags fire in a sequence, each one can generate its own ID. Make sure the ID is created once per event and reused.
- Different event names.
Purchasein the Pixel andpurchasein CAPI are not the same event to Meta. Check spelling and case. - Only checking one event. People test
PageView, see it working, and stop. TestPurchase,LeadandAddToCarttoo.
What I usually find on audits
The classic case: browser events carry an event ID only some of the time, while server events always do. On paper “dedup is set up”, but in Events Manager the dedup rate is close to zero. The fix is rarely in the CAPI tag. It is almost always cleaning up extra browser sources so every Pixel event comes from GTM with the shared ID.
A quick health check
| Where to look | Healthy | Problem |
|---|---|---|
| Events Manager → event → Details | Both Browser and Server listed, deduplication shown | Only one source, or no dedup info |
| Purchase count vs your shop | Within a small gap | Near double |
| Test Events | Same event_id on both rows | IDs differ or one is empty |
Bottom line
CAPI without deduplication makes your reports worse, not better. Spend the extra 20 minutes on the event ID before you tell the client the setup is live.
Source reading: Stape — deduplication config, Stape Unique Event ID variable on GitHub