Server-Side Tracking Event Deduplication

Consistent approaches for de-duplicating server-side conversion and other web events across all conversion APIs for ad networks.

  • Nearly every ad platform's conversions API uses the same deduplication pattern, so learning it once applies everywhere.
  • The pattern: capture the click ID and platform cookie on landing, generate one event ID per conversion (order ID for purchases, UUID otherwise), then send the same event name and ID from both the browser pixel and the server.
  • The most common failure is the browser and server each generating their own event ID; the ID must be created once and shared, or nothing matches.
  • Every server event needs a shared dedup ID, an exactly matching event name (case-sensitive), click and cookie IDs, hashed user data (SHA-256 email/phone plus the visitor's IP and user agent), and the real event timestamp.
  • Platform keys differ in name but follow the same idea: usually event name + event ID (Meta, TikTok, Pinterest, Nextdoor), while others use conversion_id (Reddit, X) or event_id alone (Quora); programmatic platforms rely more on identifiers like click IDs, hashed emails and cookies.
  • Other common pitfalls: payment webhooks with no browser context, late batch sends outside the matching window (often 48 hours), retries that generate new IDs, using your server's IP/user agent instead of the visitor's, and click IDs lost in redirects or cross-domain checkouts.
  • A 200 response only means the event was accepted, not matched or deduplicated; verify using the platform's event diagnostics.
  • Respect consent on the server: if a visitor declined tracking, don't send the server event either.
  • Best practice: route all server events through a single tracking endpoint that generates the ID, reads cookies, and forwards to every platform, rather than sending from inside application code.

Nearly every conversions API follows the same pattern, so once you understand deduplication for one ad network you can do it for any of them.

If you want to send the same conversion from the browser and the server without counting it twice, this is the pattern, and how each platform maps to it.

The Shared Pattern

  1. Capture the click ID. When a visitor lands from an ad, the platform adds a click ID to the URL. Store it in a first party cookie along with the platform’s browser cookie.
  2. Generate one event ID. When a conversion happens, create a single unique ID for it. Use the order ID for purchases and a UUID for everything else.
  3. Send it twice. The browser pixel sends the event with that ID. The server sends the same event, with the same name and the same ID, to the conversions API.
  4. The platform reconciles. When two events arrive with matching keys inside the platform’s window, it keeps one and discards the other.

Step 2 is where most setups break. The ID has to be created once and shared. If the browser and the server each generate their own, nothing matches.

What Every Server Event Needs

Property Purpose
Deduplication key The shared event ID that matches the browser event
Event name Has to match the browser event name exactly
Click & cookie IDs Tie the conversion back to the ad click
Hashed user data SHA-256 email and phone, plus the visitor’s IP address and user agent, for matching
Timestamp When the event really happened, not when it was sent

Social Ad Platforms

Platform Server-Side API Browser Companion Click & Cookie IDs Deduplication Key
Meta Conversions API Meta Pixel fbc (from fbclid), fbp event_name + event_id
TikTok Events API TikTok Pixel ttclid, _ttp event + event_id
LinkedIn Conversions API Insight Tag li_fat_id eventId, with a conversion rule for each source
Snapchat Conversions API Snap Pixel ScCid, _scid event_id on the server, client_dedup_id on the pixel
Pinterest API for Conversions Pinterest Tag epik event_name + event_id
Reddit Conversions API Reddit Pixel rdt_cid, _rdt_uuid conversion_id + event name
X Conversion API X Pixel twclid conversion_id
Quora Conversion API Quora Pixel qclid event_id
Nextdoor Conversions API Nextdoor Pixel ndclid event_id + event_name

The names change, but it’s the same key every time: an event name and an ID. I go deeper on Meta in Meta Conversions API (CAPI) Deduplication & Match Quality, and I’ve written implementation guides for TikTok and OpenAI Ads.

Programmatic & Media Platforms

These platforms follow the same idea, but lean more on identifiers than on a shared event ID.

Platform Server-Side API Key Identifiers Accepted
The Trade Desk Real-Time Conversion Events API TDID, UID2 and EUID tokens, RampID, device IDs
AppLovin (Axon) Axon Conversion API alart click ID, axwrt cookie, your own client ID, SHA-256 email and phone
Spotify Ads Spotify Conversions API IP address, device ID, hashed email and phone
Yahoo DSP Yahoo Conversion API vmcid click ID, SHA-256 email and phone, eventId for deduplication
Quantcast Conversion API Cookie or your own external ID, hashed email
Teads Teads Conversions API click_id (also the deduplication key), session ID cookie
Microsoft Monetize (Xandr) Server-side conversion pixel A token passed from the ad click and returned with the conversion
OpenAI Ads Conversions API oppref click ID, __obref cookie, SHA-256 emails, phone numbers and external IDs

Common Issues

The same problems come up on every platform:

  • Two IDs for one event. The browser and server each generate an ID. Create it once and pass it along.
  • Webhooks with no browser context. A payment webhook fires on the server with no event ID, click ID or cookies. Store them with the order or session at checkout so the webhook can look them up.
  • Event names that don’t match. The names are case sensitive, so Purchase and purchase count as two events.
  • Late delivery. Each platform only matches events inside a window, often 48 hours. A batch job that sends later creates duplicates.
  • Retries that create new IDs. When a failed request is retried, it has to reuse the original event ID.
  • Server details sent as the visitor’s. The IP address and user agent have to be the visitor’s, not your server’s.
  • Lost click IDs. Redirects and cross domain checkouts strip them from the URL. Capture them on the landing page.
  • A 200 response isn’t proof. It means the event was accepted, not that it was matched or deduplicated. Check the platform’s event diagnostics.
  • Consent applies on the server too. If a visitor declined tracking, the server event shouldn’t be sent either.

For this reason I send server events through a single tracking endpoint instead of from inside application code. One place generates the ID, reads the cookies and forwards to every platform. I cover how to build it in my server-side event tracking guide.