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

poker10 created an issue. See original summary.

longwave’s picture

What 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.

TR’s picture

Status: Active » Postponed (maintainer needs more info)
poker10’s picture

Status: Postponed (maintainer needs more info) » Active

Hi. 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):

ga("require", "ecommerce", "ecommerce.js");
ga("ecommerce:addTransaction", {"id":"5478", "affiliation":"myeshop.com", "revenue":48, "tax":0, "shipping":12, "city":"Krakow", "region":"Małopolskie", "country":"Poland"});
ga("ecommerce:addItem", {"id":"5478", "sku":"3PU03-01I1.00", "name":"Just Fun Kamienie Do Wspinaczki Plastikowe", "category":"No category", "price":"36.00000", "quantity":"1"});
ga("ecommerce:send");

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

longwave’s picture

Maybe 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.

longwave’s picture

The 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.

poker10’s picture

Ok, 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.

poker10’s picture

From 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.

TR’s picture

Title: Missing orders in GoogleAnalytics eCommerce » Missing orders in GoogleAnalytics eCommerce?
Version: 7.x-3.9 » 8.x-4.x-dev
Category: Bug report » Feature request