Duplicate Transaction Checker is a custom template, designed to help prevent duplicate transactions from being tracked in conversion tracking setups, such as Google Ads or Analytics.
This situation often arises when:
Without this mechanism, multiple conversions for the same transaction would lead to inaccurate reporting, inflated conversion numbers, and incorrect revenue data.
The initial development of this template was done by Lars Friis, and it is now maintained by Stape.
2. Download Duplicate Transaction Checker from GitHub or add it from Template Gallery. Import the variable to server Google Tag Manager by clicking Templates → New Variable Template → Click three dots in the top right corner → Click import → Add template that you’ve recently downloaded → Click Save.
Transaction ID - type value that will be used as transaction ID. It will act as a unique identifier for each purchase. When the same transaction ID is found multiple times, it flags that as a duplicate.
I use Stape.io - if enabled (as shown in the screenshot), Stape is used to store transaction data, helping ensure transaction records persist and are correctly checked across sessions or events. If Stape is not used, Firebase is required as an alternative for storing transaction data.
Log Settings - this section offers options to log the results:
The variable will check the transaction ID that comes in the event data and compare it with the transaction ID that was previously recorded in the store.
If the transaction ID is unique - the variable will return ‘false’, if a duplicate transaction ID is found - the result will be ‘true’.
Then you can use this verification in the triggers you need.
1. Enable "I use Stape.io" in the variable. You don't need to configure Firebase in this case.
2. Go to your Stape account → open the container and choose Store. The order IDs will be stored here.
Advantages over Firebase:
Note: If you want to integrate the Duplicate Transaction Checker with the Stape Store, you’ll need to set up your server-side tagging environment with Stape to handle transaction storage and retrieval in the background.
Duplicate Transaction Checker variable offers a crucial solution for maintaining the accuracy of conversion tracking data. By preventing duplicate transactions from being recorded, this tool helps ensure that your conversion metrics remain reliable, preventing inflated numbers and inaccurate revenue reporting.
Don’t hesitate to contact Stape support: we will answer your questions and help resolve any issues you might be experiencing on Stape as quickly as possible.
We are happy to hear that! Click on Try for free to register and check all the possibilities.