Event deduplication between client and server
Sending the same conversion from browser and server without a shared event ID double-counts in ad platforms. Here is how dedup works at Meta, Google, and TikTok — and how to implement it in your app.
- deduplication
- event_id
- Meta CAPI
- Google Ads
Problem: You added Meta CAPI alongside the pixel. Conversions spiked overnight — but revenue did not. The ads manager shows duplicates and your optimization targets are wrong.
Why duplicates happen
When browser and server both report Purchase for the same checkout, ad platforms count it twice unless you explicitly deduplicate. Meta uses event_id. Google uses order_id or transaction ID in upload conversions. TikTok uses event_id.
The failure mode is common: engineering adds server-side tracking, marketing keeps the pixel, nobody coordinates IDs. Both paths fire independently with different identifiers.
Dedup is not automatic — you must design IDs at the business-event layer, not per transport.
Platform-specific nuances
Meta requires event_id on both pixel and CAPI events with matching event_name and close event_time for optimal dedup. Large time gaps reduce match confidence.
Google deduplicates on order_id in Enhanced Conversions and offline conversion uploads. GA4 ecommerce uses transaction_id with separate rules — do not assume one ID covers all Google surfaces.
TikTok Events API follows Meta-like event_id patterns. LinkedIn dedup is less documented — prefer a single authoritative delivery path or consistent timestamps.
Operational checks
Audit delivery logs for the same eventId with HTTP 200 on browser and server — that is expected. Flag the same transactionId with different eventId values — that is a bug.
Add code review rules: every conversion capture() includes eventId. Missing IDs are silent until ads manager shows inflated counts.
Document canonical events in Events so product and growth use the same names across SDK, docs, and dashboards.
Testing dedup before launch
Fire a test purchase with a fixed eventId from staging. Confirm one attributed conversion in Meta Test Events and one row per platform in TrackStack delivery logs.
Compare attributed conversions to billing for a 24-hour window after launch — not just pixel helper green checks.
Sources
Official documentation and references cited in this article.
More in Engineering
First-party conversion tracking vs third-party pixels
Browser pixels and server-side CAPI solve different problems. Here is when to use each, how they complement each other, and what breaks when you rely on scripts alone.
Read postWhy ad blockers break third-party pixels
uBlock Origin and filter lists like EasyList block requests to `facebook.net` and `google-analytics.com` by default. Understand the mechanism so you can design tracking that actually delivers.
Read postDead-letter queues and delivery monitoring for conversion APIs
CAPI endpoints return 429s, 500s, and invalid payload errors. Without retries and a dead-letter queue, failed conversions vanish. Here is what to monitor and how to alert on delivery health.
Read postReady to fix your conversion pipeline?
Install the TrackStack SDK, route events to Meta and Google, and verify delivery from one dashboard.