Fix guide · Any website · easy · about 20 min

Duplicate Meta Pixel events

For the finding “Duplicate Meta events”. Using Framer? See the Framer guide.

What this means

The same event (for example PageView or Lead) was sent twice for the same pixel ID within about a second, or the same pixel was set up (initialized) twice on the page. In almost every case, the pixel is simply installed twice.

Why it costs you money:

This is about two identical browser events. It is a different problem from a browser event and a server (Conversions API) event for the same action; that pair is expected and Meta merges it when both carry the same event ID (see “Meta 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 facebook.com/tr.
  2. Load the page and accept cookies.
  3. Look at the requests. In each request’s payload, id is the pixel ID and ev is the event name. Two requests with the same id and the same ev fired at almost the same moment are a duplicate. (In Chrome these requests may show the type ping, because the pixel uses sendBeacon.)
  4. Two requests with different id values are not duplicates: that is two pixels, which may be intended (for example an agency pixel and a client pixel).

Meta Ads Data Advisor (Meta’s Chrome extension, formerly Meta Pixel Helper) reports “Duplicate Pixel code” as a common setup error and may show the same event twice. In Meta Events Manager, the Test events tool (Data sources > your pixel > Test events) will show the event twice from the same browser.

How to fix

  1. List every place the pixel can come from. Search the page source (right-click, View page source) for fbevents.js and fbq('init'. Then check:
    • the site header / theme code or a “custom code” setting;
    • your Google Tag Manager (GTM) container (look for Meta Pixel tags and Custom HTML tags containing fbq);
    • plugins and apps: CMS plugins, shop integrations, and Conversions API tools, many of which also install their own browser pixel;
    • your platform’s built-in Meta integration, if it has one.
  2. Choose one installation to keep. If you use a Conversions API tool that also runs the browser pixel (so it can share event IDs between browser and server), it is usually best to 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 fbq('track', ...) lines is not enough if the base code (fbq('init', ...)) is still there twice.
  4. Check event tags as well as base code. In GTM, two different tags may send the same event (for example a Lead tag on a form trigger and another Lead tag on a “thank you” page view). Keep one.
  5. Check triggers on single-page sites. If your site changes pages without a full reload, the Meta Pixel already sends a PageView by itself when the address changes through the browser’s History API. A GTM PageView tag on a “History Change” trigger, or one that runs on both “Page View” and “History Change”, then sends a second one. Keep one source of page views.
  6. Publish your changes and clear any cache.

Common causes

How to verify the fix

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

Sources