Fix guide · Any website · easy · about 20 min

Duplicate TikTok Pixel events: how to find and remove them

For the finding “Duplicate TikTok events”. Also for: Shopify, WordPress, Webflow, Framer.

What this means

The same event (for example a page view or Purchase) was sent twice for the same TikTok pixel within about a second. In almost every case, the pixel or one of its event calls is installed twice.

TikTok does discard repeats that carry the same event name and the same event_id within 48 hours. But the TikTok Pixel does not fill in an ID by itself (you can see the empty event_id field in the Network tab), and TikTok asks advertisers to choose a unique ID for each event, so two copies of the same event without IDs look like two separate conversions.

Why it costs you money:

  • TikTok counts some conversions twice, so reports look better than reality and your cost per result looks lower than it is.
  • Campaigns learn from inflated, noisy data and may spend budget on the wrong people.
  • Decisions based on these numbers (scaling a campaign, judging a creative) rest on wrong data.

This is about two identical browser events. A browser event and a server (Events API) event for the same action are expected; TikTok merges that pair when both carry the same event_id (see “TikTok events have no event ID”).

How to confirm it yourself

Our check runs from a browser in the EU and accepts the cookie banner before looking for duplicates.

  1. Open a private (incognito) window, open developer tools (F12), go to the Network tab and filter by analytics.tiktok.com/api/v2/pixel.
  2. Load the page and accept cookies.
  3. Click each request and look at its payload: event is the event name and context.pixel.code is the pixel ID. Two requests with the same pixel code and the same event fired at almost the same moment are a duplicate.
  4. Two different pixel codes are not duplicates: that is two pixels, which may be intended (for example an agency pixel and a client pixel). TikTok recommends one pixel per website, though; see “More than one TikTok Pixel”.
  5. The TikTok Pixel Helper extension lists the pixels and events on a page, which makes a second pixel installation easy to spot.

How to fix

  1. List every place the pixel can come from. Search the page source (right-click, View page source) for analytics.tiktok.com and ttq.load(. Then check:
    • the site header or theme code, or a “custom code” setting;
    • your Google Tag Manager (GTM) container: TikTok Pixel tags and Custom HTML tags with ttq;
    • plugins and apps: shop integrations (TikTok’s own apps for Shopify and WooCommerce install a pixel), tracking plugins and server-side tools, many of which also install their own browser pixel;
    • your own code that calls ttq.track(...), for example in a form handler or on a “thank you” page.
  2. Choose one installation to keep. If you use an integration that sends both browser and server events (so it can share event IDs between them), keep that one and remove the manual base code. If you manage everything in GTM, keep GTM and remove the others.
  3. Remove the other copies. Deleting only the ttq.track(...) lines is not enough if the base code (ttq.load(...) and ttq.page()) is still there twice.
  4. Check event tags as well as base code. Two tags may send the same event: for example a Lead tag on a form trigger and another on the “thank you” page. Keep one.
  5. Check page views on single-page sites. TikTok’s pixel measures an extra page view by itself whenever the page address changes without a reload. If your code or a GTM “History Change” trigger also calls ttq.page(), each page change is counted twice. Keep the pixel’s own page views, or turn them off with ttq.load('<PIXEL ID>', { historyObserver: false }) if you need to send them yourself (TikTok does not recommend this).
  6. Add event IDs. With your own event_id on each action, an accidental second copy carries the same ID and TikTok discards it. That is a safety net, not a replacement for removing the extra copy.
  7. Publish your changes and clear any cache.

Common causes

  • The base code is in the site’s header code and in a GTM tag.
  • A shop app or plugin installs its own TikTok pixel, and the original was never removed.
  • The GTM container itself is installed twice (once by hand, once by a plugin), so every tag fires twice.
  • Two tags send the same event on overlapping triggers.
  • On a single-page site, both the pixel and your own code send a page view on each route change.

How to verify the fix

  1. In a private window, accept cookies and check the Network tab: each event appears once per pixel code.
  2. Click a button that sends an event and check that it appears only once.
  3. Re-run the check on IsPixelWorking. The issue should be gone.

Sources

More TikTok guides