Skip to content

Server-Side Tagging6 min read

TikTok Pixel and Events API Together: How Deduplication Works and How to Set It Up

TikTok recommends running the Pixel and the Events API together, which means every conversion can arrive twice. This guide explains TikTok's deduplication rules from its own help centre, including the timing that catches most setups out.

Sakib Hossain, Founder & Lead Tracking Engineer
Founder & Lead Tracking Engineer
All Articles
In shortTikTok's Events API sends conversions from your server, so it still works when the browser Pixel is blocked or the page closes early. TikTok's advice is to use both, which means many conversions reach TikTok twice. Deduplication is how TikTok counts them once. The rules are short, but one timing detail differs from Meta's, and it explains a lot of confusing reports.

What TikTok recommends

TikTok describes the Events API as a secure server-to-server interface between your marketing data and TikTok. Its help centre recommends using the Pixel and the Events API together with event deduplication, and for websites it recommends adding an Events API integration to your existing Pixel integration.

Related: TikTok: About Events API

The deduplication rule

TikTok's deduplication article says you must share the event ID (event_id) as a parameter through both the Pixel and the Events API. Two events count as the same when they have the same event and the same event_id.

When TikTok finds a duplicate, it records the first event it received for measurement and reporting. The article describes keeping and enriching that first event, so information from the later copy isn't simply thrown away.

warning: The Pixel and Events API pair is the only case with a 5-minute condition in TikTok's article, so don't judge your setup on one quick test where both copies arrive seconds apart. Check deduplication over a day or two of real traffic.
TikTok's deduplication windows, as its help article describes them
Duplicates betweenWhen TikTok deduplicates
Pixel and PixelWithin 48 hours of the first event
Events API and Events APIWithin 48 hours of the first event
Pixel and Events APIWhen the second copy arrives after 5 minutes and within 48 hours of the first event

Related: TikTok: About event deduplication

When you don't need deduplication

TikTok's article notes that deduplication isn't needed when different events are sent through each channel. For example, if only the Pixel sends AddToCart and only the server sends CompletePayment, there is nothing to deduplicate. You need a shared event_id only for events both channels send.

How we set up the shared event ID

Create the ID once, where the event happens, and pass the same value to both channels. For a purchase, the order number is a good choice, because the server knows it too. For other events, generate an ID in the browser and send it to your server with the event.

Pixel event with an event_id the server will reuse
javascript
// Browser: the order number doubles as the event ID.
const eventId = "order-10482";

ttq.track("CompletePayment", {
  value: 129.0,
  currency: "USD",
}, { event_id: eventId });

// Server: send CompletePayment to the Events API with event_id "order-10482".
What to do
  • List the events both the Pixel and the Events API send, and give each one a shared event_id.
  • Use the same event name on both sides, exactly as TikTok spells it.
  • Send the match keys you have and are allowed to send with the server event, as TikTok's article asks for all relevant match keys to be passed.
  • Check Events Manager over a day of real traffic before you judge whether deduplication works.

Sources

The rules above come from TikTok's help centre articles on the Events API (last updated April 2025) and event deduplication (last updated May 2025), checked on 30 November 2026. TikTok updates these pages, so read the current versions before you build.

Related: About Events API · About event deduplication · Our guide: Meta Pixel and Conversions API duplicate events

Problems and fixes

1Purchases counted twice

Symptom
TikTok reports more purchases than your store recorded.
Cause
The Pixel and Events API copies carry different event_id values, or none.
Fix
Send the same event_id on both copies, for example the order number.

2Event names don't match

Symptom
Both copies arrive but are treated as different events.
Cause
The browser and server use different event names.
Fix
Use TikTok's standard event name on both sides, spelled the same way.

3Server event never appears

Symptom
Only Pixel events show in Events Manager.
Cause
The server request fails, or the server sends a different event than the Pixel.
Fix
Log the server responses, fix any errors, and confirm the event names on both sides.

Implementation Checklist

Verify each milestone before deploying changes to live production ad accounts.

  • ✓Pixel and Events API both installed
  • ✓Shared event_id on every event both channels send
  • ✓Same event names on both sides
  • ✓Order number used as the purchase event_id
  • ✓Match keys sent with server events where allowed
  • ✓Results checked over a day of real traffic
Tags:TikTok Events APITikTok PixelDeduplicationevent_idServer-side tracking
The takeawayRunning the TikTok Pixel and Events API together recovers conversions the browser loses, as long as both copies share an event name and event_id. Use the order number for purchases, deduplicate only the events both channels send, and judge the result over real traffic, not one quick test.

Frequently asked questions

Should I use the TikTok Pixel and Events API together?

TikTok recommends it: use both together with event deduplication, and add the Events API to an existing Pixel integration for websites.

What does TikTok use to deduplicate events?

The event and its event_id. TikTok says you must share event_id through both the Pixel and the Events API.

Which copy does TikTok keep?

TikTok records the first event it received for measurement and reporting, and describes keeping and enriching it.

How long is TikTok's deduplication window?

48 hours from the first event. For a Pixel and Events API pair, TikTok's article describes the second copy arriving after 5 minutes and within 48 hours.

Want us to set this up for you?

This is the kind of work we do for clients every week. Tell us about your setup and we'll take it from there.