Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello.
We are using Google Analytics 7.x-2.2 (most recent) and also latest version of ubercart (7.x-3.9) in few eshops. We have active uc_googleanalytics module to report orders to GA ecommerce. But the problem is, that this module is only reporting part of the orders (depending on sites, from 80% to 40% of orders). There is no common sign of non-reported orders such as payment type, shipping type, or other. It is just random. What is the problem? Why all orders are not reported correctly?
Thanks
Comments
Comment #2
longwaveWhat payment method are you using? With some payment methods (e.g. PayPal WPS) customers often do not return to the site after they have completed payment, but the user must see the order complete page on the site in order to trigger Google Analytics.
Comment #3
TR CreditAttribution: TR commentedComment #4
poker10 CreditAttribution: poker10 commentedHi. As i have mentioned previously, there is no coincidence with payment method nor shipping method. Unreported orders have almost all payment methods - collect on delivery, bank transfer or custom payment gateway. We are using default order completition page for all payment methods.
We have added watchdog logging to the end of "uc_googleanalytics_ecommerce_js" function. Then we have compared results in google analytics ecommerce statistics and watchdog log. From friday to monday, there were 2 orders, which are in watchdog and are not in google analytics. The watchdog log is called at the end of the "uc_googleanalytics_ecommerce_js" function, so after that the JS is only added to the page by "drupal_add_js" function.
This is the example of the non reported script, which we have logged in watchdog (and is not in google analytics ecommerce report):
So where is the problem? In your module? In google analytics tracking? Or somewhere else? Please do not close this issue as postponed, if you need more specific info, write what you need and we will provide it.
Thanks
Comment #5
longwaveMaybe some of your users are disabling JavaScript, or using NoScript or a similar browser plugin, or using private browsing mode with tracking disabled? From your logs it looks like the JavaScript is getting to the end user's browser but after that point it is out of our control - if their browser does not run the JavaScript for any reason there is nothing we can do about it.
Comment #6
longwaveThe payment method *is* also relevant, as if it's a contributed (non core) payment method, it may be doing something wrong with the order complete page which means it's not getting sent to the user's browser correctly.
Comment #7
poker10 CreditAttribution: poker10 commentedOk, we can try to determine, if users are blocking tracking scripts. We have added check for GA variable (according to this article) and will see, if the non-reported orders are from people blocking tracking JS, or not. I will report soon.
I think that the COD payment method is in Ubercart core (Payment method pack), so this should be ok, because non-reported orders also had this payment method.
Comment #8
poker10 CreditAttribution: poker10 commentedFrom out reports, there is cca 10-20% of visitors, who are blocking tracking JS (according to my previous post), so most likely, this problem is only with them. So my final question is, it is not possible to track this people another way? For example by CURL (see bottom of the article).
Thanks for your effort.
Comment #9
TR CreditAttribution: TR commented