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

  1. 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).
  2. Click the request and note the event_id in the payload.
  3. Close the window, open a new private window and repeat. If the second visit sends the same event_id for the same event, the ID repeats across visits.
  4. Find the code or tag that sends this event (search for ttq.track('Lead' or check your tag manager) and look at where its event_id comes 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.

  1. 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.
  2. 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.
  3. 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.

  4. 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.

  5. 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

  1. Repeat the test with two private windows: the same event now carries a different event_id on each visit.
  2. For one test conversion, the browser event_id and the server event_id are identical.
  3. Re-run the check on IsPixelWorking. The issue should be gone.

Sources

More TikTok guides