Ecommerce tracking is one of the most important features of Google Analytics. It shows the number of transactions and revenue collected by the website. Therefore, data integrity in eCommerce tracking is paramount for marketing and business decisions.
Having duplicate transactions in Google Analytics is one of the most common issues in the airline industry. Duplicate transactions not only increase the number of fake transactions, but also inflate the total revenue. This causes reporting to be untrustworthy.
Throughout this article, we will explain how duplicated transactions can be identified, common causes, and most importantly, how to mitigate these issues.
How to identify duplicate transactions
1. Implement this Custom Report in your main reporting view.
The transaction total should always be 1 per transaction ID. The transaction ID is meant to be unique.
Once the report has been imported to the main view in GA, filter for Transactions to be Greater than 1 to see how many duplicate transactions are being reported in the platform.
This screenshot shows the total number of instances by PNR tracked in GA. This demonstrates that there is a duplicate transaction issue.
Why is this happening?
The reason why a transaction gets duplicated is that the hit carrying the transaction is sent two or multiple times to GA. The hit carrying the transaction can be a page view with eCommerce tracking activated, an Ecommerce tag, or an event hit. Google Analytics will record these actions as a new transaction every time they happen.
This could be caused by:
The confirmation page URL is shared by other flows on the website. E.g.:
Manage my Booking
Refreshing the confirmation page
Accessing the confirmation page directly by saving the URL
Returning to the confirmation page with a bookmark
Navigating to the confirmation page with the back button
Restoring a page from a closed browser session
How to solve the issue
There are many ways and workarounds that can help solve this problem. We will list here the most effective ones that have been implemented to our customers.
Solution 1: Website Implementation
The confirmation page of the IBE (Internet Booking Engine):
URL must be unique
Should not be allowed to be refreshed
Should only be accessed by going through the payment page
Should not be shared with other flows
All these actions can be done by a web developer or who manages the IBE flow.
Solution 2 & 3: dataLayer
If the first solution is not feasible because of the functionality of the website, there are other two solutions that can be applied via the dataLayer.
Solution 2. dataLayer Settings
Set the eCommerce dataLayer to fire only one time per conversion even if the user refreshes the confirmation page or access it in another way in another session.
This can be done by setting up a rule that fires the eCommerce dataLayer only when the user is coming from the payment page.
Solution 3. dataLayer Variables
Add a variable to the Ecommerce dataLayer or placing another dataLayer before the eCommerce dataLayer that has the name of the flow the user is at. E.g.:
The value of the variable can be as many booking flows there are on the website (Manage My Booking, Redemption flow, Web Check-in, etc).
This variable will allow Google Tag Manager (or any other Tag Management System) to differentiate between the confirmation pages of each flow and set the trigger for the transaction hit correctly.
Implementation in Google Tag Manager (GTM)
Access GTM (You will need Admin access). There are many ways this can be done in GTM:
Google Analytics Transaction Tag
Google Analytics event that only collects eCommerce data
This would require the dataLayer to have an ‘event’ variable to target it
Google Analytics Pageview tag with Enhanced Ecommerce activated (only if implemented)
In this example, we will use a Google Analytics Transaction Tag.
1. Create a dataLayer variable for bookingFlow
2. Create a trigger for the confirmation page that has the bookingFlow variable targeting the IBE
3. Add the trigger to the Google Analytics Transaction Tag
Having duplicate transactions in GA will skew every report and compromise business decisions that are taken from those reports and it directly and undermines the investment in paid efforts (Google Ads, Facebook, Email, etc).
It is recommended to implement a solution that is fast, easy, and less costly to implement. Checking duplicate transactions periodically by the Analytics Manager to assure data integrity is a must. Data integrity is paramount and it is a must to have reliable reports.