Google Analytics double counting pageviews: how to find and fix a duplicate tag
If your GA4 pageviews look about twice as high as expected, the same tracking code is probably installed two times on your site. Find every place it is added, keep one, and remove the rest.
Google Analytics 4 counts what it is sent. If two copies of the tag load on the same page, each one sends its own page_view and its own events, and GA4 records both. Nothing warns you. The numbers just quietly become wrong.
This page explains what it looks like, how to check for it with free tools, and how to fix it on the common website setups.
What people see
The typical signs are:
- Pageviews and event counts that are roughly double what you expected, or that suddenly jumped on the day someone changed something.
- Users and sessions that stay about the same while pageviews per session go up. Both tags usually share the same visitor cookie, so people are not counted twice, but their actions are.
- A bounce rate or engagement rate that changes sharply for no clear reason.
- Conversions or purchases that appear twice, or a total that is higher than your real orders or enquiries.
The cause is almost always one of these:
- The tag was pasted into the theme or header, and later someone also added it through Google Tag Manager.
- A plugin or app adds GA4, and the theme or a second plugin adds it again.
- A website builder has a built-in Google Analytics field, and the code was also pasted into a custom code box.
- A developer added the tag to the code, and marketing added it again through a tag manager.
Using two different Measurement IDs (the G- codes) on purpose is a different case. That usually sends data to two separate properties (or data streams) and does not double the numbers in either one.
Why it matters
Bad numbers lead to bad decisions. If pageviews are doubled, you may think an ad campaign worked when it did not, or that a page is popular when it is not. Doubled conversions can make a marketing agency look better than it is, or hide a real drop in sales.
It also affects trust and cost. If you report traffic to a boss, a bank, an investor or a client, you want figures you can defend. And a duplicate tag is extra code on every page, which adds a little to loading time.
One more point: a second tag is often one more thing that ignores your cookie consent setup. If you are fixing tracking, it is worth checking that too (see cookies set before consent).
How to check if your site has it
All of these are free.
1. Look at the page source. Open your site in Chrome, right click and choose View page source. Press Ctrl+F (Cmd+F on Mac) and search for googletagmanager.com/gtag/js and for G-. If you see the same Measurement ID configured twice, or the gtag script loaded more than once, you have a duplicate. Also search for GTM-: if a Tag Manager container is present as well as a hardcoded GA4 tag, check inside the container for a second GA4 tag.
2. Watch the network requests. Open the page, press F12 to open developer tools, and go to the Network tab. Type collect in the filter box, then reload the page. GA4 sends data to addresses containing /g/collect. If you see two requests for page_view (the en=page_view part of the request) for one page load, with the same tid=G-... value, the tag is firing twice.
3. Use Tag Assistant. Google's Tag Assistant (tagassistant.google.com) shows which Google tags load on a page and whether one fires more than once.
4. Use DebugView or Realtime in GA4. In Google Analytics, Admin, then DebugView (you need debug mode on, which Tag Assistant can switch on). Load one page and see whether page_view appears twice in the stream. The Realtime report is a rougher check: open one page in a private window and see if views jump by two.
The automatic check in week 38 of SiteMonday looks for duplicate analytics tags as part of its analytics setup review, if you would rather not do this by hand.
How to fix it in general
The rule is simple: one Measurement ID should be installed by one method only. Decide which method you want, then remove the others.
- List every place the tag could come from: your theme or template files, header and footer code boxes, any analytics or SEO plugin, your platform's built-in Google Analytics field, and Google Tag Manager.
- Choose one. If you already use Tag Manager for other tags, keep GA4 there. If not, a single built-in integration or one pasted snippet is fine.
- Remove the tag from every other place and save.
- Clear any site or plugin cache so visitors do not get the old page.
- Check again using the methods above.
Take a note of the date you fixed it. GA4 cannot remove or correct the doubled data already collected, so your reports will have a before and after, and you should compare across that date carefully.
Common platforms
Menu names change between versions and themes, so look for the idea rather than the exact wording.
- WordPress: check your theme's settings for a header scripts or tracking field, plus any installed analytics plugin such as Site Kit by Google or MonsterInsights. Use only one of them. See the WordPress guide.
- Google Tag Manager: look for more than one GA4 or Google tag with the same Measurement ID, or one tag with several triggers that fire on the same page. See the Google Tag Manager guide.
- Shopify: the tag can come from the theme code, the Google and YouTube app, or a custom pixel in customer events settings. See the Shopify guide.
- Wix, Squarespace, Webflow: these have a built-in field for the Measurement ID, usually under marketing or integrations, or in site settings. Check that you did not also paste the code into a custom code area. Guides: Wix, Squarespace, Webflow.
- Next.js and other custom sites: the tag may be in a layout file and again in a component or a library. See the Next.js guide.
One special case: single page sites that load pages without a full reload can send an extra page_view when the browser history changes. In GA4, under Admin, Data streams, your stream, Enhanced measurement, the page changes option can overlap with a manual page view tag. If the duplicate only happens on navigation and not on the first load, look there.
How to confirm the fix worked
Repeat the checks you used to find the problem. In the page source, the Measurement ID should appear once. In the Network tab, one page load should send one page_view request. In DebugView, one visit to one page should show one page_view.
Then watch the real reports for a few days. Pageviews and events per session should drop back to a normal level compared with before the fix, while users and sessions stay roughly the same.
How to stop it coming back
- Write down which method installs GA4 on your site, and who is allowed to change it.
- Tell any agency, developer or freelancer before they add tracking, so they check what is already there.
- After installing a new theme, plugin, app or after a redesign, run the quick checks again.
- Keep your tag manager container tidy: remove old tags and test changes in preview mode before publishing.
- Set up your filters properly. Your own visits can also inflate numbers, see internal traffic not filtered in GA4.
If you want this checked on a schedule rather than only after something looks wrong, SiteMonday reviews analytics setup in week 38 and lists what it finds in a ranked fix list. Making the change is up to you or your developer.
Step by step for your platform
- GA4 tag installed twice, double counting on WordPress
- GA4 tag installed twice, double counting on Google Tag Manager
- GA4 tag installed twice, double counting on Shopify
- GA4 tag installed twice, double counting on Wix
- GA4 tag installed twice, double counting on Squarespace
- GA4 tag installed twice, double counting on Webflow
- GA4 tag installed twice, double counting on Next.js
Questions
Does GA4 remove duplicate pageviews automatically?
No. If two tags send a page view, GA4 records both. You need to remove the extra tag on your site.
Will fixing the duplicate tag correct my old data?
No. Data already collected cannot be edited or removed in GA4. Note the date of the fix and compare numbers before and after with that in mind.
Why are my users normal but my pageviews doubled?
Both tags usually use the same visitor cookie, so people are still counted once. Each tag sends its own page views and events, so those counts go up.
Is it a problem to have GA4 in Google Tag Manager and also in my theme?
Yes, if both use the same Measurement ID and both fire on the same pages. Pick one method and remove the other.
How can I tell quickly if my tag fires twice?
Open your page, press F12, go to the Network tab, filter for `collect` and reload. Two `page_view` requests with the same `G-` ID for one load means a duplicate.
Can two different Measurement IDs on one site cause double counting?
Not in the same property. Two different IDs usually send data to two separate properties or data streams, so each shows its own correct count.