Fix guide · Framer · easy · about 20 min

Duplicate TikTok Pixel events on Framer: how to fix

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

What this means

The same event (for example a page view or Lead) was sent twice for the same TikTok pixel within about a second. On Framer, this nearly always means the pixel, or one of its event calls, is installed in two places.

TikTok discards repeats with 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 without IDs look like two separate conversions.

Why it costs you money:

  • TikTok counts some conversions twice, so reports look better than reality and cost per result looks lower than it is.
  • Campaigns learn from inflated data and may spend budget on the wrong people.

This is about two identical browser events. A browser event plus a server (Events API) event for the same action is 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 your published site in a private (incognito) window (Framer does not run custom code in the canvas preview). Open developer tools (F12), go to Network and filter by analytics.tiktok.com/api/v2/pixel.
  2. Accept cookies.
  3. In each request’s 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 at almost the same moment are a duplicate. Different pixel codes mean two pixels, which is a separate finding (“More than one TikTok Pixel”).
  4. Click to another page of the site and watch again: each page change should produce one page view per pixel code, not two.

The TikTok Pixel Helper extension lists the pixels on a page, which makes a second installation easy to spot.

How to fix

  1. Check every place a Framer site can load the pixel. Search the published page’s source for analytics.tiktok.com and ttq.load(, then check:

    • Site Settings > Code (older Framer articles call it Project Settings > Custom Code). Each entry has its own Placement, Pages and Run settings, so open every entry, including ones limited to some pages.
    • The Custom Code section in each page’s own settings, for example a “thank you” page with its own event code.
    • Embeds and code components on the canvas, including marketplace components and templates that came with tracking.
    • Plugins. Framer lets plugins add their own scripts to your custom code, and you can switch off code a plugin has added. PixelFlow, for example, a third-party plugin, adds its own TikTok Pixel and warns that a second, separately installed pixel sends duplicate events.
    • Your GTM container, whether GTM is loaded by Framer’s Cookie Banner (step 2) or by a snippet in custom code. TikTok’s GTM setup from Events Manager adds a base code tag (named TT-<pixel code>-Web-Tag-Pixel_Setup) and event tags.
  2. Check that GTM is installed only once. In our tests, Framer’s Cookie Banner loaded GTM itself when its GTM ID property was filled in. If a GTM snippet is also pasted into Site Settings > Code, remove the snippet. If you see gtm.js requests for two different container IDs, check both: if each has TikTok tags, every event is sent twice.

  3. Keep one installation and remove the rest. If you use a plugin that sends both browser and server events, keep it and remove the base code from custom code and GTM. If you manage tracking in GTM (for example together with Framer’s Cookie Banner), remove the pixel from custom code and plugins. Deleting only the ttq.track(...) lines is not enough if the base code (ttq.load(...) and ttq.page()) is still there twice.

  4. Check how page views are sent. Framer switches between pages without a full page reload: the address changes through the browser’s History API. TikTok’s pixel already measures an extra page view by itself whenever the address changes this way. A second page view on every page change comes from something that sends it again:

    • a GTM tag that calls ttq.page() on a History Change trigger;
    • a custom code entry set to Run: On Every Page Visit that calls ttq.page();
    • the base code itself in an entry set to On Every Page Visit instead of Once. The base code ends with ttq.page(), so each run can add a page view on top of the automatic one. Framer’s own instructions use Run: Once for site-wide tracking snippets.

    Remove the extra page view and keep the pixel’s own. TikTok documents historyObserver: false to turn off its automatic page views, but does not recommend it.

  5. Check form and button events. Framer forms can redirect to another page on submit, show an overlay, or update the button or form. A Lead can easily be sent twice: by code on the “thank you” page and by a GTM tag on a form or click trigger, or by your own code and a plugin’s form tracking (PixelFlow says it captures every Framer form submission as a Lead event). Keep one.

  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. See “TikTok events have no event ID”.

  7. Publish the Framer site, and the GTM container if you changed it.

Common causes

  • TikTok’s base code is pasted into Site Settings > Code and a plugin installs its own TikTok Pixel.
  • The pixel is in custom code and in GTM.
  • Two GTM containers on the page both contain TikTok tags, or one container is loaded twice (Cookie Banner plus a pasted snippet).
  • A page view tag or script runs on every page change, on top of the pixel’s automatic page view.
  • A Lead is sent both from the “thank you” page and from a form trigger.

How to verify the fix

  1. In a private window on the published site, accept cookies and check that each event appears once per pixel code: on page load, after moving to another page, and after submitting a test form or clicking a tracked button.
  2. Re-run the check on IsPixelWorking. The issue should be gone.

Sources

More TikTok guides