Download the ebook now

Thankyou for sharing the details. Here is your ebook on "Top questions people ask about Server Side Tagging".
Oops! Something went wrong while submitting the form.
Blog
GA4
How To Find Duplicate Transactions And Fix Them In GA4 | 2023
GA4

How To Find Duplicate Transactions And Fix Them In GA4 | 2023

By
4 min read
April 24, 2023

Out of the total websites in the world, more than 40% are built using WordPress. That’s a huge number for any CMS platform and hence, there is a great chance that your website is built using WordPress. Also, you probably use the WordPress Contact Form 7 plugin for your website's contact us form.

So tracking of WordPress contact form 7 is extremely important.

We will show two ways to track WordPress contact form 7

  • Traditional Google tag manager way that would take a lot of time.
  • and Tagmate way! ( No Code set up and fast way) 😲
Key Takeaways
  • Lorem ipsum
  • dolor sit
  • amet consectetur
  • Quam turpis pharetra
  • ut at cras non quis consectetur
  • sit cursusVel fermentum
  • posuere cras, diam est
  • nunc aliquet.

For an e-commerce website, transactions are one of the most important events as they are directly related to the revenue generated and the overall functioning of the business. Google Analytics 4 has a dedicated metric called ‘Transactions’ that helps web store owners measure sales-related activities like purchases and returns happening on their websites. 

Apart from revenue, measuring transactions also helps online business owners analyze the effectiveness of their marketing activities, website UI, and customer behavior. Naturally, it is a top priority for analytics professionals at e-commerce companies to measure transactions correctly. 

However, a significant number of countries are introducing user privacy-focused legislations  and browsers like Brave are proactively blocking trackers by default. This is significantly affecting the ability of analytics solutions like Google Analytics to track data. 

Timeline of legislations supporting privacy of internet users against 3rd party cookies

In fact, Google had to introduce GA4 because Universal Analytics didn’t conform to these regulations and it needed to do away with the third-party cookies, making server-side tracking the only viable option for analytics.

If you are a website owner who migrated or wants to migrate from UA to GA4, you will notice that Google Analytics 4 is quite problematic when it comes to measuring transactions. You will often find that it misses transactions or shows duplicate transactions which is a big problem for all e-commerce stores. 

Thus, I decided to write a quick and simple guide on how to find duplicate transactions in GA4 and fix them. Towards the end, I will also throw some light on why you must not expect 100% accurate insights from GA4 (and its not Google’s fault!) to help you make better business decisions. 

Let’s get started:

How To See Purchases By Transaction Id

Before we start finding ‘duplicate transactions’, we must first know where to find the list of transactions in Google Analytics 4. 

In Universal Analytics, you just need to navigate to ‘Conversions’ and click on  ‘E-Commerce’  to locate ‘Transactions’ to get a transaction-id wise list of all transactions. 

Here’s the process to view purchases by Transaction Id in GA4:

  1. To see purchases by Transaction Id in Google Analytics 4, you need to navigate to ‘Explore’ and choose a  blank template i.e. create a new exploration.

  1. Next, set ‘Transaction IDs’ as rows and ‘Date’ as columns. Add ‘Purchase revenue’ as values. 

That’s it! 

How To Find Duplicate Transactions In Google Analytics 4 (GA4)?

In this section, we will go through the quick and simple process to find duplicate transactions in GA4.

Let’s begin:

Navigate to ‘Explore’ on your Google Analytics 4 dashboard.

Create a new free form exploration with Transaction ID as your dimension and Transactions as the metric.

You will be able to see something like this after following the steps mentioned above:

How To Find Duplicate Transactions And Fix Them In GA4 | 2023
(Image Courtesy: Optizent)

To find duplicate transactions, just view the ‘Transactions’ row and look for more than one transaction against ‘Transaction Ids.’

In the above image, you will be able to find two transactions for multiple Transaction Ids in the rows 5, 6, 8, and 13. 

This is caused because the transactions were fired twice. If they had been fired multiple times e.g. seven, the value would have been seven and GA4 would have shown 7x the real revenue for that particular transaction.

There’s an alternate method to view duplicate transactions:

Go to GA4 DebugView and if you find the same event more than once, you are likely to face issues with transaction duplication:

How To Find Duplicate Transactions And Fix Them In GA4 | 2023
(Image Credits: Analytics Mania)

That’s a huge problem, isn’t it?

What Causes Duplicate Transactions In Google Analytics 4 (GA4)?

In order to fix the issue of duplicate transactions in GA4, we first need to understand why they occur in the first place. 

In this section, we will quickly go through X reasons why duplicate transactions occur in GA4:

1. User Activity Related Issues

You might be seeing duplicate transactions due to returning traffic i.e. a 

  • The user visits your e-commerce website’s product page multiple times. 
  • Refreshing the (product) page before it fully loads.
  • The user restarts/restores after a closed browser session.
  • Repeatedly hitting forward and backward buttons.
  • The user navigates to a new page and returns to using the back button 

Generally, these issues can be solved by streamlining GTM (Google Tag Manager) which we will discuss later in this article.

2. dataLayer Event Duplication

Bugs can cause the dataLayer.push to be activated multiple times in the GA4 Debug View after a visitor clicks the “Add To Cart” button.

3. (Mis)use of Google Analytics 4’s ‘Create event’ feature

Many users find the ‘Create event’ feature under the Events tab in the Admin dashboard and instinctively create purchase events in the GA4 interface. 

However, most users would have already created the same event in Google Tag Manager and it ultimately leads to duplicate transactions since both GA4 and GTM send the same event. 

4. You Have Configured The Same Event In GTM and GA4

It is observed that many e-commerce website owners end up adding GA4 tracking codes on the website’s source code and configure the same tracking code using Google Tag Manager. This creates a similar problem as discussed in the above point since both approaches (Hardcoded website tracking and GA4 + GTM) send the same data to Google Analytics 4.

5. Problematic Trigger Configuration

There are good chances of ‘trigger misconfiguration’ due to your developer’s mistakes (or even bugs) and it isn’t easy to detect one.

But we will discuss how you can work your way around it in the next section.

6. The Thank You Page Is Loaded Multiple Times

In case your e-commerce website allows the user to load the ‘Thank You’ page multiple times, it may result in transaction duplication since most developers configure the loading of the Thank You page as the trigger for measuring a transaction.

7. GTM Containers Are Repeated On The Website

Lastly, there is a chance that your developer might have added the same Google Tag Manager container on the website ultimately leading to transactions getting duplicated.

How To Fix The Duplicate Transaction Problem In Google Analytics 4 (GA4)?

In this section, we will go through the solutions for fixing duplicate transactions that occur due to the above mentioned reasons:

1. How To Solve User Activity Caused Transaction Duplication

To fix the transaction duplication caused by user activities mentioned in the above section, you may follow the below steps using Google Tag Manager:

  1. Use a Custom JS variable to verify that the transaction id about to be fired corresponds to the one currently saved in a cookie/in local storage. 
  2. You must trigger the buy tag based on the value returned by the preceding variable.
  3. Fire a tag immediately after the buy tag to fetch the Transaction ID and save it to a cookie/local storage.

2. How To Solve dataLayer Event Duplication

To fix duplicate dataLayer events, you need to take help from your developer to ensure that the event is fired only one time for every interaction by correcting the code.

3. How To Fix Duplicate Transactions Issue Caused By Firing The Same Event Through GTM And GA4’s ‘Create event’ feature

Do not use the ‘Create Events’ feature for creating the events that you have already created in the Google Tag Manager. In case you have created it using both, delete the one in Google Analytics 4.

4. How To Solve Transaction Duplication Caused By Configuring The Same Event In GTM and GA4

Firstly, you must check your e-commerce website’s source code to see if you have actually hard coded the same tracking code on your website as in Google Tag Manager, you might need the help of a developer.

Also, you can use Chrome’s developer tools and go to Sources. Next, hit + SHIFT +F (Mac) or CTRL + SHIFT + F (Windows) and type the name of the event (for example, add_to_cart).

If any of the codes in the results contain ‘gtag’, it is an indication that the corresponding event is being duplicated. Once detected, you must make appropriate changes to your online store’s website to resolve the issue.

Alternatively, you may remove the GTM container from your e-commerce site and see if GA4 still receives event data. Hence, the solution in this case is inline with the above case (point 3) i.e. to use only Google Tag Manager to track conversions.

5. How To Fix Duplicate Transaction Issue Caused Due To Trigger Misconfiguration

While there are a lot of ways to mess up trigger configuration, you can use the below process to see where things went wrong in your case:

  • Start the Preview and Debug mode and perform the action that you suspect of creating duplicate transactions once you clear the stream. 
  • Now, navigate to the Summary and check whether the concerned tag is fired multiple times. 
  • In case it is fired at least two or more times, open the message and locate the triggering conditions that led to firing of the tag. 
  • From here, all you need to do is make these conditions more accurate and precise so that the concerned tag isn’t fired unless you wish so.

6. How To Solve Transaction Duplication Due Thank You Page Being Loaded Multiple Times

Basically, there are two ways to solve the problem of duplicate events caused by the user loading the Thank You page more than once:

Method 1

Link the event to the backend so that it only triggers when a real transaction is made. For instance, the trigger should be fired only after your backend verifies the receipt of payment instead of triggering it after the user enters credit card details and clicks the "Complete payment" button. All of these activities must be completed before the user is redirected to the ‘Thank You’ page.

Method 2

Now, you can also configure your ‘Thank You’ page to load only once the transaction is completed. If the user tries to reload the ‘Thank You’ page, the website must redirect them to another page like an order summary page.

On top of that, you may also use Measurement Protocol to send transaction hits from the backend. You may also try using localStorage to keep records of the transaction IDs sent to Google Analytics 4.

7. How To Solve Transaction Duplication Due Repeated GTM Containers On The Website

To check if you are facing this issue, disable the preview mode and open Chrome and follow the steps mentioned below:

  • Go to Developer Tools and click on the Network tab.
  • Now type ‘gtm.js’ in the search field and see if you get more than one result, verify if it was intended to have multiple GTM containers 
  • If not, contact your developer to get it fixed and you are all set to go!

Zander Aycock suggested another tip which can help you with the issue:

Data Streams > Choose your data stream > Configure tag settings > Click on Your Google Tag > "Ignore duplicate instances of on-page configuration (recommended)".

Wrap Up

Ultimately, we recommend ecommerce stores to set up server side tagging to improve the overall accuracy of analytics.

I hope that you will be able to identify the reason for duplicate transactions on your GA4 with the help of this quick guide. If you have any questions/suggestions, feel free to write to us at hello@tagmate.app for getting the solution.

Frequently Asked Questions

Lorem ipsum dolor sit amet consectetur?

Lorem ipsum dolor sit amet consectetur. Viverra ut feugiat id ipsum morbi. A ipsum massa consequat ut urna vestibulum enim. Mauris id dignissim eu donec. Nibh urna eu nisl volutpat ut purus amet habitant fermentum.

Lorem ipsum dolor sit amet consectetur?

Lorem ipsum dolor sit amet consectetur. Sodales pellentesque enim sed dolor. Vel elementum ullamcorper adipiscing nec tristique. Egestas tellus amet praesent pulvinar quis.

Lorem ipsum dolor sit amet consectetur bibendum diam vel aliquet aliquam fringilla amet turpis varius srcu tincidunt potenti in ut amet ac aliquet donec volutpat ?

Lorem ipsum dolor sit amet consectetur. Aliquam diam magnis imperdiet pulvinar posuere. Pretium leo sed nunc morbi. In nibh risus purus ipsum amet. Leo sed laoreet orci faucibus. Ut lorem augue eget id venenatis odio tortor nec. Adipiscing bibendum tellus neque tortor.

Lorem ipsum dolor sit amet consectetur vel id viverra ultricies sed hendrerit et nulla?

Lorem ipsum dolor sit amet consectetur. Viverra ut feugiat id ipsum morbi. A ipsum massa consequat ut urna vestibulum enim. Mauris id dignissim eu donec. Nibh urna eu nisl volutpat ut purus amet habitant fermentum.

Lorem ipsum dolor sit amet consectetur bibendum diam vel aliquet?

Lorem ipsum dolor sit amet consectetur. Viverra ut feugiat id ipsum morbi. A ipsum massa consequat ut urna vestibulum enim. Mauris id dignissim eu donec. Nibh urna eu nisl volutpat ut purus amet habitant fermentum.

Subscribe to get our latest updates
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
eBook
Nunc lectus tempus dolor libero vulputate dui sed velit Augue enim malesuada
Download ebook
Subscribe to get our latest updates
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
eBook
Nunc lectus tempus dolor libero vulputate dui sed velit Augue enim malesuada
Download ebook
Subscribe to get our latest updates
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
eBook
Nunc lectus tempus dolor libero vulputate dui sed velit Augue enim malesuada
Download ebook
Subscribe to get our latest updates
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
eBook
Nunc lectus tempus dolor libero vulputate dui sed velit Augue enim malesuada
Download ebook
Subscribe to get our latest updates
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
eBook
Nunc lectus tempus dolor libero vulputate dui sed velit Augue enim malesuada
Download ebook
Subscribe to get our latest updates
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
eBook
Nunc lectus tempus dolor libero vulputate dui sed velit Augue enim malesuada
Download ebook
This is some text inside of a div block.

Heading

This is some text inside of a div block.
Google Analytics 4 Migration Via Tagmate

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Block quote

Ordered list

  1. Item 1
  2. Item 2
  3. Item 3

Unordered list

  • Item A
  • Item B
  • Item C
Text link

Bold text

Emphasis

Superscript

Subscript

EBOOK
Top questions people ask about Server Side Tagging
Download for Free NOW!
Stay a step ahead.
Get served hottest tracking posts from industry-experts every week.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Ready to Get Started
Stay Updated
Subscribe to get the latest news, industry trends, blog posts, and updates.

Set up tags in seconds.
Not days.

Start Free Trial