Fix guide · WordPress · easy · about 30 min
Duplicate Meta Pixel events on WordPress
For the finding “Duplicate Meta events”. Also for: Any website, Shopify, Webflow, Framer.
What this means
The same event (for example PageView, AddToCart or Lead) was sent twice for the same pixel ID within about a second, or the same pixel was set up twice on the page. On WordPress this nearly always means two plugins, or a plugin and a pasted code snippet, both load the Meta Pixel (still often called the Facebook Pixel).
Why it costs you money:
- Meta counts some conversions twice (double-counting), so your reports look better than reality and your cost per result looks lower than it is.
- Meta’s optimization learns from inflated data and may spend budget on the wrong people.
This is about two identical browser events. A browser event plus a server (Conversions API) event for the same action is expected; Meta merges those when they share an event ID.
How to confirm it yourself
- Log out of WordPress or use a private (incognito) window: some tracking plugins skip logged-in administrators, so you may not see the duplicate while logged in.
- Open developer tools (F12), go to Network and filter by
facebook.com/tr. - Load the page and accept cookies.
- In each request’s payload,
idis the pixel ID andevis the event name. Two requests with the sameidand the sameevat almost the same moment are a duplicate. Differentidvalues mean two different pixels, which may be intended (for example an agency pixel and your own). - On a WooCommerce store, also click Add to cart on a product:
AddToCartshould appear once per pixel ID.
Meta Ads Data Advisor (Meta’s Chrome extension, formerly Meta Pixel Helper) reports “Duplicate Pixel code” as a common setup error, and the Test events tool in Meta Events Manager shows the event twice.
How to fix
-
List every place the pixel can come from. Right-click the page, choose View page source and search for
fbevents.jsandfbq('init'. Then check:- Plugins > Installed Plugins in your WordPress dashboard for Meta Pixel for WordPress (Meta’s official pixel plugin), Meta for WooCommerce (formerly Facebook for WooCommerce), PixelYourSite, Pixel Manager for WooCommerce or any other tracking plugin;
- snippet plugins such as WPCode, and Elementor Pro’s Custom Code;
- your theme’s options (for example Divi’s Theme Options > Integration tab) and the theme’s
header.phpfile; - your Google Tag Manager (GTM) container, and how GTM itself is added (Site Kit by Google, GTM4WP or a snippet).
-
Choose one installation to keep. Usually:
- WooCommerce store: Meta for WooCommerce, or one tracking plugin such as PixelYourSite. PixelYourSite documents that when it detects Meta for WooCommerce it makes sure the pixel is not loaded twice and takes over all pixel tracking, while Meta for WooCommerce keeps the catalog sync.
- Site without WooCommerce: Meta Pixel for WordPress, one tracking plugin, or GTM.
If you use a plugin that also sends server events (Conversions API), keep that one, so browser and server events share event IDs.
-
Remove the other copies.
- Meta Pixel for WordPress next to Meta for WooCommerce: the WordPress plugin stops its own WooCommerce events when Meta for WooCommerce is active, but it still loads the pixel. Deactivate it unless you need its form integrations, and if you keep it, check the Network tab for double
PageViewevents. - Meta for WooCommerce kept only for the catalog, with tracking done elsewhere (for example in GTM): WooCommerce documents a snippet that turns off the plugin’s pixel and its Conversions API:
add_filter( 'facebook_for_woocommerce_integration_pixel_enabled', '__return_false' );. Add it with a snippet plugin. - Pasted code: delete the pixel snippet from WPCode, Elementor Custom Code, theme fields or theme files. Removing only the
fbq('track', ...)lines is not enough if the base code withfbq('init', ...)is still there twice. - GTM: delete Meta tags for any events your plugin already sends.
- Meta Pixel for WordPress next to Meta for WooCommerce: the WordPress plugin stops its own WooCommerce events when Meta for WooCommerce is active, but it still loads the pixel. Deactivate it unless you need its form integrations, and if you keep it, check the Network tab for double
-
Make sure GTM is added only once. In Site Kit, whether it adds the container is the Let Site Kit place code on your site toggle under Site Kit > Settings > Connected Services > Tag Manager > Edit (Site Kit warns when it finds a container already on the site while you connect Tag Manager). GTM4WP can also add the container, and so can a snippet in the theme. Keep one. In the Network tab, filter by
gtm.js: each container ID should load once. If two copies of the same container load, every tag in it can fire twice. -
Check GTM for overlapping tags, for example a
Leadtag on a form trigger and anotherLeadtag on the thank-you page. -
Update your Meta plugin. Meta for WooCommerce has fixed duplicate
AddToCartevents more than once, most recently in version 3.7.2 (June 2026) for repeated AJAX cart updates. -
Clear every cache (plugin, host and CDN), so visitors stop getting pages with the old code.
Common causes
- Meta Pixel for WordPress and Meta for WooCommerce are both active with the same pixel.
- A tracking plugin loads the pixel, and Meta’s base code is also pasted into a snippet plugin, a theme field or Elementor Custom Code.
- The pixel is in a plugin and in a GTM tag.
- GTM is added twice, for example by Site Kit or GTM4WP and by a snippet in the theme.
- An older version of Meta for WooCommerce sends
AddToCarttwice on AJAX add-to-cart. - A theme or child theme came with a pixel in its
header.php.
How to verify the fix
- Clear all caches. In a private window, accept cookies and check that each event appears once per pixel ID: on page load, after a button that sends an event, and after Add to cart on a store.
- Re-run the check on IsPixelWorking. The issue should be gone.
Sources
- WordPress.org, Meta Pixel for WordPress: https://wordpress.org/plugins/official-facebook-pixel/
- Meta Pixel for WordPress source, WooCommerce integration (“Tracking is skipped … when Facebook for WooCommerce is active”): https://github.com/facebookincubator/Facebook-Pixel-for-Wordpress/blob/main/integration/class-facebookwordpresswoocommerce.php
- WooCommerce, Meta for WooCommerce documentation (filter to turn off the pixel and Conversions API): https://woocommerce.com/document/facebook-for-woocommerce/
- Meta for WooCommerce changelog (duplicate
AddToCartfixes, 3.0.34 and 3.7.2): https://github.com/facebook/facebook-for-woocommerce/blob/main/changelog.txt - PixelYourSite, Facebook for WooCommerce and PixelYourSite: https://www.pixelyoursite.com/facebook-for-woocommerce-pixelyoursite
- WordPress.org, WPCode (adding a Facebook pixel to header and footer): https://wordpress.org/plugins/insert-headers-and-footers/
- Elementor, Add Facebook Pixel to Elementor (Custom Code): https://elementor.com/help/how-to-add-facebook-pixel-to-elementor/
- Elegant Themes, How to use the Divi Integration tab: https://help.elegantthemes.com/en/articles/2734187-how-to-use-the-divi-integration-tab
- Site Kit by Google, Tag Manager (Let Site Kit place code on your site; container already placed): https://sitekit.withgoogle.com/documentation/supported-services/tag-manager/
- WordPress.org, GTM4WP: https://wordpress.org/plugins/duracelltomi-google-tag-manager/
- 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 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