- Posts: 19
- Thank you received: 3
Google Analytics 4 plugin: discrepancies in revenue reporting
2 years 11 months ago #356019
by pvukovic
-- url of the page with the problem -- :
winescholarguild.org
-- HikaShop version -- : 4.7.3
-- Joomla version -- : 3.10
-- PHP version -- : 8.0.27
Hi,
we noticed a discrepancy in GA4 revenue reporting compared to Hikashop.
For example, for September 2023, GA4 reported a 23% higher monthly sales figure compared to Hikashop. With old GA, we had small discrepancies in the range of 1%-3%, but after switching to GA4 plugin, we have this situation.
Upon comparing order amounts captured in GA4 and in Hikashop, we noticed a few issues - here are some examples:
1. Order C2L9M8*** – Hikashop value $1,603.86, GA4 $2,659.98 (1.65x greater)
2. Order C2L9N9*** – Hikashop $969.30, GA4 $1,938.60 (2x greater)
3. Order C2L9M8*** – Hikashop value $906.45, GA4 $906.45 (ok, identical)
We would like to know why these differences are occurring and what is the best approach to fix this issue?
Thank you.
-- HikaShop version -- : 4.7.3
-- Joomla version -- : 3.10
-- PHP version -- : 8.0.27
Hi,
we noticed a discrepancy in GA4 revenue reporting compared to Hikashop.
For example, for September 2023, GA4 reported a 23% higher monthly sales figure compared to Hikashop. With old GA, we had small discrepancies in the range of 1%-3%, but after switching to GA4 plugin, we have this situation.
Upon comparing order amounts captured in GA4 and in Hikashop, we noticed a few issues - here are some examples:
1. Order C2L9M8*** – Hikashop value $1,603.86, GA4 $2,659.98 (1.65x greater)
2. Order C2L9N9*** – Hikashop $969.30, GA4 $1,938.60 (2x greater)
3. Order C2L9M8*** – Hikashop value $906.45, GA4 $906.45 (ok, identical)
We would like to know why these differences are occurring and what is the best approach to fix this issue?
Thank you.
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356024
by nicolas
Replied by nicolas on topic Google Analytics 4 plugin: discrepancies in revenue reporting
Hi,
First, could you provide the screenshot of the details of an order with the issue (like order C2L9N9*** ) ? And do you have any details for that order on GA ?
Could it be that the order was actually reported twice to GA and that GA added the amount for both instead of counting it as the same ?
Normally that should not be a problem as GA properly handle cases where the same transaction id is sent several times:
support.google.com/analytics/answer/12313109
First, could you provide the screenshot of the details of an order with the issue (like order C2L9N9*** ) ? And do you have any details for that order on GA ?
Could it be that the order was actually reported twice to GA and that GA added the amount for both instead of counting it as the same ?
Normally that should not be a problem as GA properly handle cases where the same transaction id is sent several times:
support.google.com/analytics/answer/12313109
The following user(s) said Thank You: pvukovic
Please Log in or Create an account to join the conversation.
2 years 10 months ago - 2 years 10 months ago #357490
by pvukovic
Replied by pvukovic on topic Google Analytics 4 plugin: discrepancies in revenue reporting
Hi Nicolas,
I apologize for the very late reply, we have been working on a Joomla 4 switch and decided to deal with this problem after.
The problem is still present, so I conducted a fresh investigation and compared the orders from Dec 11, 2023 in Google Analytics and Hikashop.
To get orders from Google Analytics, I am using the Explore feature with this setup: tinyurl.com/yvxesx3l
This is being compared with a Hikashop orders list for the same date: tinyurl.com/ymymcage
Out of 123 analyzed orders, 31 (roughly 25%) had various discrepancies.
Here are my findings - I am using a Google Doc because there is a limit to the number of links I can include in a post:
docs.google.com/document/d/1ZPDPFh3af6zJ...jr4/edit?usp=sharing
I am primarily interested in solving problem #3 (order value discrepancy), as it is severely affecting our GA reporting accuracy. However, if you have suggestions for the other two issues, I am happy to hear them.
P.S. Is there a logging feature in the HikaShop analytics plugin that we could turn on to verify that the correct data is being sent?
Thanks,
Peter
I apologize for the very late reply, we have been working on a Joomla 4 switch and decided to deal with this problem after.
The problem is still present, so I conducted a fresh investigation and compared the orders from Dec 11, 2023 in Google Analytics and Hikashop.
To get orders from Google Analytics, I am using the Explore feature with this setup: tinyurl.com/yvxesx3l
This is being compared with a Hikashop orders list for the same date: tinyurl.com/ymymcage
Out of 123 analyzed orders, 31 (roughly 25%) had various discrepancies.
Here are my findings - I am using a Google Doc because there is a limit to the number of links I can include in a post:
docs.google.com/document/d/1ZPDPFh3af6zJ...jr4/edit?usp=sharing
I am primarily interested in solving problem #3 (order value discrepancy), as it is severely affecting our GA reporting accuracy. However, if you have suggestions for the other two issues, I am happy to hear them.
P.S. Is there a logging feature in the HikaShop analytics plugin that we could turn on to verify that the correct data is being sent?
Thanks,
Peter
Last edit: 2 years 10 months ago by pvukovic.
Please Log in or Create an account to join the conversation.
2 years 10 months ago #357522
by nicolas
Replied by nicolas on topic Google Analytics 4 plugin: discrepancies in revenue reporting
Hi,
1. Regarding the time discrepancy, it's probably due to the timezone difference between your website and Google Analytics;
2. Regarding the VAT, this depends on the "show taxed prices" setting of the HikaShop configuration. If it's configured to display prices without taxes, then the GA4 plugin will send the amounts without tax to GA, and if it's configured to display prices with taxes, then the GA4 plugin will send the amounts with taxes.
3. I can see that this order total is 108.90, with 18.90 of taxes, so that's a total without taxes of 90. That's precisely half of the amount in GA. So it might be that the amount was reported twice to GA.
The plugin actually has actually two ways to send the data to GA. One with javascript at the end of the checkout, and one with a server to server connection if the measurement ID is provided.
It might be that when both are triggered for an order, GA actually count the amounts twice ?
Supposing this is the case, what you can try is to add the code:
return '';
after the line:
private function getPurchaseJS() {
in the file plugins/system/hikashop_ga4/hikashop_ga4.php
This will skip the javascript transfer of the order data so that only the server to server transfer will be done.
Maybe having a setting to deactivate the javascript transfer might be necessary in order to circumvent that issue...
4. If you activate the "debug" setting of the plugin, you will get debug data of the server to server connection. It is necessary because it's not possible to get the data sent to GA otherwise. But the JS data is not logged because it can be checked directly in the browser of the user when debugging the plugin.
1. Regarding the time discrepancy, it's probably due to the timezone difference between your website and Google Analytics;
2. Regarding the VAT, this depends on the "show taxed prices" setting of the HikaShop configuration. If it's configured to display prices without taxes, then the GA4 plugin will send the amounts without tax to GA, and if it's configured to display prices with taxes, then the GA4 plugin will send the amounts with taxes.
3. I can see that this order total is 108.90, with 18.90 of taxes, so that's a total without taxes of 90. That's precisely half of the amount in GA. So it might be that the amount was reported twice to GA.
The plugin actually has actually two ways to send the data to GA. One with javascript at the end of the checkout, and one with a server to server connection if the measurement ID is provided.
It might be that when both are triggered for an order, GA actually count the amounts twice ?
Supposing this is the case, what you can try is to add the code:
return '';
after the line:
private function getPurchaseJS() {
in the file plugins/system/hikashop_ga4/hikashop_ga4.php
This will skip the javascript transfer of the order data so that only the server to server transfer will be done.
Maybe having a setting to deactivate the javascript transfer might be necessary in order to circumvent that issue...
4. If you activate the "debug" setting of the plugin, you will get debug data of the server to server connection. It is necessary because it's not possible to get the data sent to GA otherwise. But the JS data is not logged because it can be checked directly in the browser of the user when debugging the plugin.
Please Log in or Create an account to join the conversation.
2 years 10 months ago #357542
by pvukovic
Replied by pvukovic on topic Google Analytics 4 plugin: discrepancies in revenue reporting
Thank you, I will try that and report back after a few days with fresh data.
Please Log in or Create an account to join the conversation.
2 years 9 months ago #357653
by pvukovic
Replied by pvukovic on topic Google Analytics 4 plugin: discrepancies in revenue reporting
Hi, I can confirm the suggested fix works (adding a return statement to getPurchaseJS() function).
Please let us know when you officially update the plugin and many thanks for the help.
Peter
Please let us know when you officially update the plugin and many thanks for the help.
Peter
Please Log in or Create an account to join the conversation.
2 years 9 months ago #357656
by nicolas
Replied by nicolas on topic Google Analytics 4 plugin: discrepancies in revenue reporting
Hi,
Thank you for your feedback. We're going to add an extra option to the GA4 plugin in order to take this into account.
Thank you for your feedback. We're going to add an extra option to the GA4 plugin in order to take this into account.
Please Log in or Create an account to join the conversation.
Time to create page: 0.133 seconds