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:
- Meta counts some conversions twice, so your reports look better than reality and your cost per result looks lower than it is.
- Meta’s optimization learns 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. 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.
- Open a private (incognito) window, open developer tools (F12), go to the Network tab and filter by
facebook.com/tr. - Load the page and accept cookies.
- Look at the requests. In each request’s payload,
idis the pixel ID andevis the event name. Two requests with the sameidand the sameevfired at almost the same moment are a duplicate. (In Chrome these requests may show the typeping, because the pixel usessendBeacon.) - Two requests with different
idvalues 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
- List every place the pixel can come from. Search the page source (right-click, View page source) for
fbevents.jsandfbq('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.
- 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.
- Remove the other copies. Deleting only the
fbq('track', ...)lines is not enough if the base code (fbq('init', ...)) is still there twice. - Check event tags as well as base code. In GTM, two different tags may send the same event (for example a
Leadtag on a form trigger and anotherLeadtag on a “thank you” page view). Keep one. - Check triggers on single-page sites. If your site changes pages without a full reload, the Meta Pixel already sends a
PageViewby itself when the address changes through the browser’s History API. A GTMPageViewtag 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. - Publish your changes and clear any cache.
Common causes
- The pixel base code is in the site’s header code and in a GTM tag.
- A Conversions API tool or plugin runs its own browser pixel, and the original pixel was never removed.
- The GTM container itself is installed twice (for example once by hand and once by a plugin), so every tag fires twice.
- Two GTM tags send the same event on overlapping triggers.
- A theme or template came with a pixel already installed, and another was added later.
How to verify the fix
- In a private window, accept cookies and check the Network tab: each event appears once per pixel ID.
- Click a button that sends an event and check that it also appears only once.
- Re-run the check on IsPixelWorking. The issue should be gone.
Sources
- Meta for Developers, Get started with the Meta Pixel: https://developers.facebook.com/docs/meta-pixel/get-started
- Meta for Developers, Meta Ads Data Advisor (formerly Meta Pixel Helper; “Duplicate Pixel code”): https://developers.facebook.com/docs/meta-pixel/support/pixel-helper
- Meta for Developers, Meta Pixel implementation for single page applications (automatic
PageViewon history changes): https://developers.facebook.com/docs/meta-pixel/implementation/tag_spa - Meta Business Help Center, Test events tool: verify app and web browser events for Meta: https://www.facebook.com/business/help/2040882565969969
- Meta for Developers, Handling duplicate Pixel and Conversions API events: https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events