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.
- Open a private (incognito) window, open developer tools (F12), go to the Network tab and filter by
analytics.tiktok.com/api/v2/pixel. - Load the page and accept cookies.
- Click each request and look at its payload:
eventis the event name andcontext.pixel.codeis the pixel ID. Two requests with the same pixel code and the same event fired at almost the same moment are a duplicate. - 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”.
- 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
- List every place the pixel can come from. Search the page source (right-click, View page source) for
analytics.tiktok.comandttq.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.
- 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.
- Remove the other copies. Deleting only the
ttq.track(...)lines is not enough if the base code (ttq.load(...)andttq.page()) is still there twice. - Check event tags as well as base code. Two tags may send the same event: for example a
Leadtag on a form trigger and another on the “thank you” page. Keep one. - 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 withttq.load('<PIXEL ID>', { historyObserver: false })if you need to send them yourself (TikTok does not recommend this). - Add event IDs. With your own
event_idon 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. - 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
- In a private window, accept cookies and check the Network tab: each event appears once per pixel code.
- Click a button that sends an event and check that it appears only once.
- Re-run the check on IsPixelWorking. The issue should be gone.
Sources
- TikTok API for Business, Install Pixel using code (base code,
ttq.trackgoes to every loaded pixel,ttq.instance): https://business-api.tiktok.com/portal/docs?id=1739585702922241 - TikTok API for Business, Event Deduplication (same event and
event_idwithin 48 hours): https://business-api.tiktok.com/portal/docs?id=1771100965992450 - TikTok Business Help Center, Event deduplication (pixel-to-pixel duplicates): https://ads.tiktok.com/resources/help/article/event-deduplication?lang=en
- TikTok API for Business, Work with Single Page Applications (extra page view on URL changes,
historyObserver): https://business-api.tiktok.com/portal/docs?id=1801524003169281 - TikTok API for Business, Create a pixel (one pixel per website recommended): https://business-api.tiktok.com/portal/docs?id=1740858779758593
- TikTok Business Help Center, TikTok Pixel Helper: https://ads.tiktok.com/resources/help/article/tiktok-pixel-helper-2.0?lang=en
More TikTok guides
- TikTok Pixel fires before cookie consent: how to fix it
- TikTok Pixel not firing after cookie consent: how to fix it
- Repeated TikTok event IDs drop real conversions: how to fix
- 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)