Skip to main content

Data & Intelligence

How to Fix Duplicate Events in Google Analytics 4?

Ga4 Duplicate Events Feature Images

If you have installed Google Analytics 4 recently or already have it for your site, you might have experienced some difficulties in the debugger. For instance, 2 or 3 instances of the same event appear. If we reload the page, at first, it will disappear and then they start to duplicate again.  

Common reasons why events log twice in Google Analytics 4: 

  • One such common reason is the event could be logged in multiple GA4 accounts. 
  • The event might be fired on both the page view and event tracking code.  
  • The event might be logged twice due to a browser or network issue. 

Some of these reasons are straight and clear but some of them are a bit tricky and you need expert advice. Keep reading the article as you can find some useful tips to fix duplicate events issue in GA4.  

How to Identify & Resolve Duplicate Events in GA4?

In the below section, you can find why events track twice in Google Analytics 4 debugger & how to fix it. We hope this post will be useful for all as we have covered all the common reasons related to event duplication in GA4. Let’s get started.  

1. Hardcoded both Google Analytics 4 and Google Tag Manager Tracking Code on the website

Gtm Tracking

Adding both GA4 tracking code and GTM code on the website will result in duplicate events in GA4 debugger. This is because the same event is tracked twice from GTM and GA4.  

To get a clear idea of this, let’s have a look at this example.  

Let’s say, one of your visitors has added a product to the cart and started the checkout process. As you have hard coded the GA4 code directly on the website, the checkout event will be tracked twice, i.e., one from GTM and another from GA4.  

How to identify if you have hard-coded the GA4 tracking code on the website?  

  • Jump to the source code of the site (Ctrl+U or right-click and click “View Page Source”). 
  • Now go to the browser’s developer tools -> Sources. 
  • Enter the event name that is causing duplicate issue in the search field (add to cart or checkout or purchase etc.) 
  • If you found the event in the results, your site has been affected by double tagging. This means that the same data is tracked twice – one from GTM+GA4 and another from hardcoded GA4. 

The solution is removing the hardcoded tracking code and setting up everything in the GTM container.   


2. Same container was added to the website multiple times

Data Intelligence - The Future of Big Data
The Future of Big Data

With some guidance, you can craft a data platform that is right for your organization’s needs and gets the most return from your data capital.

Get the Guide

This happens when the developer accidentally adds the tracking code twice on the website which results in duplicate events. You can also see this common error from the Chrome extension “Tag Assistant.”  

So, if you notice this error, check the network requests in developer tools by following the below steps. 

  • Let’s open Chrome (or any browser), go to the top right corner and click the 3 dots. 
  • Now navigate to More tools -> Developer tools. 
  • Select the network tab and search for gtm.js with the All option selected. Now refresh the page.  
  • Now have a look at how many times gtm.js has appeared.  
  • If it is only once, you’re good to go. Just ignore the warnings from Tag Assistant.  
  • If it is more than once, then take a closer look at the containers added to the website and remove the irrelevant ones.  

3. Create an Event option in Google Analytics 4 

Create Event Option In Ga4

From the GA4 admin dashboard, when you navigate to Events, you can see a button “Create Events.” (Admin -> Events -> Create Events).  

Most of the people usually will start sending the events from GTM to GA4 and also create the same event in the GA4 dashboard using the create events feature. Please stop doing this, create events feature is not designed this way.  

You’re already sending events from GTM to GA4 (add to cart, checkout, purchase, etc.). This is enough, no need to create them again with this feature. Otherwise, GA4 will create another event with the same name which results in duplicate events in GA4.  

To sum up, here are some key points when you start tracking the events in Google Analytics 4.  

  • Everything is considered an event in GA4, even the pageviews. 
  • If you want to create the event category, event action, or label, you can create them manually as custom parameters.  
  • You can send up to 25 parameters within the same event. But if you want to visualize the reports, you must register them as a custom definition.  
  • You can modify the events in GA4 if you feel there are any typo errors.  
  • You can use the “Debug View” option in GA4 to test your events.  

4. Poor configuration of Tags and Triggers 

This could be one of the reasons for duplicate events in the GA4 dashboard. You can get to know this from the GTM’s preview and debug mode.  

Head over to the Summary section from the left navigation and clear all messages from the data stream. Then click on the summary and look at the events that are causing duplication issues like how many times each one has been fired.  

If it is tracked once, then you need to investigate more on this with the help of the developer. If tracked multiple times, click the tag, scroll down, and check the preview messages of that tag and fix the trigger conditions if required.  

5. Duplicate DataLayer events 

Let’s suppose you have started tracking your events configured in the GA4 dashboard using the GA4 DebugView. In that, you saw one of your events, let’s say Add to Cart is tracked twice.  

When a user has clicked the Add to Cart button on your website, datalayer.push will be activated and the clicks data is visible in the GTM’s preview mode.  

When the event is tracked twice, it could sometimes be due to some bug, or the developer activates the code multiple times. If that’s the case, kindly check with your tech team, ask them to fix it and fire the event once per interaction.  

Data Analytics

6. Ignore the Duplicate Instances option in GA4 

6. Ignore Duplicate Instances Option In Ga4

Let’s say you already have Universal Analytics installed on the website and as per the migration warnings, you have just created a new Google Analytics 4 property and connected both using Google Tag Manager.  

Now you must see multiple pageviews registered in GA4. You’re not alone. You can fix these duplicate events in the GA4 issue by enabling an option in the dashboard.  

  • From the GA4 dashboard, navigate to the Data Streams section. 
  • Select configure tag settings and click on the Google tag. 
  • Under additional settings, enable “Ignore duplicate instances of on-page configuration” and see if this works. 

Got more questions on How to fix duplicate events in GA4? Post them in the below comments section.  

You can also reach out to the team at Perficient for tracking the custom events in Google Analytics 4.  


Thoughts on “How to Fix Duplicate Events in Google Analytics 4?”

  1. Hi Mouli,

    Thank you for a great blog post!

    Our situation is more like number 6 – Ignore the Duplicate Instances option in GA4 * we tried, but unfortunately without success! The platform we are using is Shopify. Two years ago we connected Google Analytics (UA), everything works perfectly fine. In the UA property all numbers are perfect. As soon as we added GA4 the issue started. The tag assistant extension shows that we currently have 3 tags: 2x GA4 tags (identical tags) and, 1x UA tag, which is the original one. Currently, we are still looking at the data on UA which is 100% accurate until July first. That is why we are trying to figure out how to remove the additional GA4 tag since we have 2 installed somewhere. On July 1st, the UA tag will stop working anyway., unless we need to remove it as well and keep only 1 GA4 tag?

    Any help solving this issue will be greatly appreciated.

    Thank you,


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Mouli Ganapathy

Mouli is a seasoned professional with over 13 years of experience in MarTech, Digital Experience Consulting & Solutions. As a Senior Client Partner at Perficient, Mouli expertly manages the company's E-Commerce and Digital Marketing practice, helping clients to optimize customer engagement and increase conversions for maximum return on investment. With a wealth of knowledge and a diverse background in various industries, including Retail, Consumer Packaged Goods, Manufacturing, and Healthcare, Mouli is a trusted advisor and valuable asset to Perficient and its clients.

More from this Author

Follow Us