Is your tracking loading twice? Finding duplicate GTM, GA4 and Pixel tags on WordPress
One of the most common problems I find in WordPress audits is tracking code that loads twice. Nothing looks broken on the website, but analytics shows more page views and events than really happened, and every decision built on those numbers is a little wrong. Here is how to find and fix it in about 15 minutes.
- Duplicates usually come from two plugins doing the same job, or a plugin plus code in the theme.
- Look for the same GTM ID, GA4 ID or Pixel ID twice in the page source.
- Keep one source for each tag, write it down, and remove the rest.
Where duplicates come from
- Two plugins: for example Google Site Kit and GTM4WP both adding the same Tag Manager container. I found exactly this during a plugin audit on an e-commerce store.
- Plugin + theme: a developer pasted the code in
header.phpor the theme options years ago, and later someone installed a plugin. - GTM + hard-coded tag: GA4 is inside GTM, and also added directly with
gtag.js. - Page builders: Elementor or another builder has its own “custom code” area with an old snippet.
How to find them
- Open the page, right-click → View page source, and search for
GTM-,G-(GA4) andfbq('init'(Meta Pixel). Count how many times each ID appears as a loaded script. - Install Tag Assistant (Google) and Meta Pixel Helper. Both show when the same ID fires twice.
- In your browser’s Network tab, filter by
collect(GA4) orfacebook. One click on “Add to cart” should create one request per tool. - In WordPress, list every plugin that touches analytics: Site Kit, GTM4WP, PixelYourSite, Facebook for WooCommerce, header/footer code plugins, and your SEO plugin’s settings.
How to fix them safely
- Decide the single source for each tool. My usual choice: GTM loads everything, and plugins only provide the data layer.
- Turn off the extra output in the plugin settings first (for example, disable the “insert tag” option) instead of deleting the plugin straight away.
- Test on a staging copy, or at a quiet time, with Tag Assistant open.
- Add a note on the analytics side (“tracking changed on this date”) so the drop in page views isn’t read as a drop in traffic.
Tell your marketing team before you fix it
After you remove a duplicate, page views and events can drop sharply overnight. That is the real number, but without warning it looks like a traffic disaster. Share the date and the reason with whoever reads the reports.
FAQ
Does a duplicate GTM container hurt site speed?
Yes, a little: the same scripts load twice. The bigger damage is to data quality, because every tag inside the container can fire twice.
Can duplicates affect my ads?
Yes. If purchase or add-to-cart events are counted twice, ad platforms report more conversions than you had and optimise on wrong signals.
How often should I check?
After every new plugin, theme change or redesign, and once a quarter as part of a general audit.