Fix guide · Any website · medium · about 45 min
Repeated TikTok event IDs drop real conversions: how to fix
For the finding “TikTok event IDs repeat across visits”.
What this means
Your site sent the same TikTok event_id on two separate visits. An event ID should name one action by one visitor, such as one order or one lead.
TikTok deduplicates on the pixel code, the event name and the event_id: it keeps the first event and discards later ones with the same combination that arrive within 48 hours. That applies to pixel events among themselves, too, not only to pixel and server copies. So when every visitor’s Purchase carries the same ID, TikTok can keep one and drop the rest.
Why it costs you money:
- Real conversions disappear from TikTok reporting, so campaigns look worse than they are.
- Campaigns that optimize for conversions learn from far fewer of them.
- Server copies (Events API) that share these IDs are dropped the same way.
How to confirm it yourself
- Open your page in a private (incognito) window, open developer tools (F12), go to Network and filter by
analytics.tiktok.com/api/v2/pixel. Accept cookies and trigger the event (for example, submit a test lead). - Click the request and note the
event_idin the payload. - Close the window, open a new private window and repeat. If the second visit sends the same
event_idfor the sameevent, the ID repeats across visits. - Find the code or tag that sends this event (search for
ttq.track('Lead'or check your tag manager) and look at where itsevent_idcomes from.
How to fix
Every action needs its own ID. The only time two events should share one is when they describe the same action from two sides: the browser copy and the server copy of one purchase.
-
Find where the ID comes from. Typical sources of repeated IDs:
- a fixed value typed into the code or a tag manager field (
event_id: 'purchase', a campaign name); - an ID generated when the page was built or cached, not when the visitor acted. A page cache, CDN or static site generator then serves the same “random” ID to everyone;
- a value shared by many visitors, such as a product ID, a form ID or the page URL;
- a tag manager variable that keeps its value for the whole session or comes from a long-lived cookie.
- a fixed value typed into the code or a tag manager field (
-
Generate the ID at the moment of the action. TikTok suggests order numbers or transaction IDs; for other events a random value works, as long as the pixel and the Events API use the same one:
- purchases: the order number (
order-10482); - leads and sign-ups: the submission ID your backend creates, or a random value created when the form is sent;
- page views and clicks: a random value created when the event fires, for example
crypto.randomUUID().
const eventId = crypto.randomUUID(); ttq.track('Lead', {}, { event_id: eventId }); // Send eventId with the form data, so your server can reuse it in its Events API call. - purchases: the order number (
-
Keep browser and server in step. If your server sends the same conversion through the Events API, it must use the same per-action ID, not a constant of its own.
-
If the ID comes from a tag manager: use a variable that creates a new value per event (for example Stape’s Unique Event ID variable), not one stored for the session.
-
Publish your changes and purge page and CDN caches, so no cached page keeps the old ID.
Common causes
- The event ID field in a tag manager template holds fixed text instead of a variable.
- The ID is rendered into the page by the server, and the page is then cached.
- The site uses a product, form or page identifier as the event ID.
- A tag manager variable keeps its value for the whole session.
How to verify the fix
- Repeat the test with two private windows: the same event now carries a different
event_idon each visit. - For one test conversion, the browser
event_idand the serverevent_idare identical. - Re-run the check on IsPixelWorking. The issue should be gone.
Sources
- TikTok API for Business, Event Deduplication (keys, keep the first event, discard later copies within 48 hours, unique IDs such as order numbers): https://business-api.tiktok.com/portal/docs?id=1771100965992450
- TikTok Business Help Center, Event deduplication (pixel-to-pixel and Events API-to-Events API duplicates within 48 hours): https://ads.tiktok.com/resources/help/article/event-deduplication?lang=en
- TikTok API for Business, Events API 2.0 setup guide for Web (
event_iddeduplicates the same event sent several times from one channel or across channels): https://business-api.tiktok.com/portal/docs?id=1771100865818625 - MDN Web Docs, Crypto: randomUUID() method: https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID
- Stape, Unique Event ID variable: https://stape.io/helpdesk/documentation/unique-event-id
More TikTok guides
- TikTok Pixel fires before cookie consent: how to fix it
- TikTok Pixel not firing after cookie consent: how to fix it
- Duplicate TikTok Pixel events: how to find and remove them
- TikTok Pixel event_id missing: how to add it for deduplication
- TikTok click ID (ttclid) lost after an ad click: how to fix it
- TikTok Pixel tracks a button on desktop but not on mobile
- Two TikTok Pixels on one site: when it's fine, how to fix
- TikTok Events API deduplication: match the pixel's event_id
- How to set up the TikTok Events API (with deduplication)