You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Hi Nick
Many years ago we discussed GA showing duplicates of the same transaction ID, probably caused by user refreshing the order summary page after payment. I thought this was resolved, but I am still getting duplicates.
Can you remember what code you changed?
I thought it would be in jslib.com but you said you would probably add some logic in ECOM_OrderMan.
No worries if you can't remember as I may just add a flag in ecom_orders table when google purchase tag in updated for first time, so it can't happen again.
Last edited by zanart (06-25-2025 05:29:29)
Offline
UPDATE:
I can now see the logic in ECOM_OrderMan and the klastorder cookie.
It is work correctly as well, so need to find why I still get duplicates if there not coming from OrderSummary page
Offline
Looks like you found the control added to prevent duplicates. I'm surprised there are any duplicates and would like to look further into this. Are you running version 9.4 yet on the site? Are there any common things with the duplicated orders - like the payment method?
What we saw years ago was users bookmarking their confirmation pages for their orders to later check statuses. When those bookmarks were accessed they were firing off an order to Google for analytics. We put things in there to prevent that like a cookie, timing controls, and controls to ensure the order was just processed.
Offline
HI Nick.
It's weird!
Appears to have started happening around the date I changed over to 9.4. Previous to that, I would get the odd duplicate, maybe 1 day. Last few days I have been getting around 10-15 a day.
What is really weird is the value of the duplicates.
If I have an order for £20 + VAT = £25. The duplicate value is google shows as £45 which is the order total + the order total without VAT.
This is the same for nearly every duplicate.
I have one transaction which shows 5 times. The quantity adds up a 4x full order value and 1 X order value less VAT. doesn't make any sense to me
I am not too sure if GA auto corrects after a few days, so I will keep checking them to see if the duplicates clear.
Anyway, it is probably something to do with my set up.
Offline
Ok. If you're fully updated and on 9.4, the first thing I'd check is to see if you have both a GTM tag id and a GA4 tag id configured under System / Component / Settings / Search Engine Optimization Settings. If you do, check your GTM setup at Google to see if you have GTM tied into GA4 there. If you do, that's the reason for your duplicates. You're either going to want to use a GTM tag id in K9 and configure GTM to interact with GA4, or you want to use GA4 direct - not both.
We're about to launch a new website here which has a ton of new features and documentation that we've been working on for some time now. Contact me via the ticket system and I can get you a preview link for the new site and direct you to the docs on GTM and GA4 which will walk you through proper setup. What I posted above is that in a nutshell.
Offline
All sorted. As expected it was self inflicted!
I have removed the adwords id from K9 and now just have the Google Tag ID field entered. Everything seems to calculate as expected including Adwords.
Offline
Even though I think Adwords is reporting correctly again, can i just check......
In Adwords account > tag setup, it says the event should be a 'conversion' but in googletag.php it is set up as a 'purchase'.
Obviously I am not using the snippet but wanted to check it is ok for the K9 generated snippet to be different.
<!-- Event snippet for ga tag conversion page --> <script> gtag('event', 'conversion', { 'send_to': 'AW-****/*******', 'value': 1.0, 'currency': 'GBP', 'transaction_id': '' }); </script>
Offline
The integration has been fully tested and verified working by sending the send_to as 'AW-****/*******' for 'purchase' events. This works using GA4 and GTM. 'purchases' are 'conversions' for when you receive orders, and get counted that way in AdWords. 'conversion' events, as I understand them, can have monetary value, but are not necessarily purchases of items (orders). So while a 'conversion' event may be able to be used to log a conversion for a purchase, a 'purchase' event is what should be used (mainly because it's a more accurate representation of what happened with much more data attached). I hope that helps. I recommend leaving things as they are.
Offline