Jump to content

Ecommerce Data for Analytics Missing


Ronnie50
 Share

Recommended Posts

Hi,
Upon going to google analytics and attempting to look at the number of transactions and other related ecommerce data, I noticed all zeros. I have gone back in the history to figure out when it stopped receiving the ecommerce data and it appears that update 5.2.11 has broken the data transmission for my site. This is the same update that switched the google analytics over to universal analytics, from what I understand.

I am currently using 5.2.13 and also using the blueprint skin from Shopdev. The same code modifications that were made by CC to the stock skins have also been made to my skin but apparently google still isn't receiving the data. Is anyone else having this problem?
 
If you are using 5.2.11 and later and are using the blueprint skin from shopdev, Is your ecommerce data showing in google analytics?  I am trying to see if anyone else is having this issue or if it is my site that is causing the problem.

Thanks in advance
Ron

Link to comment
Share on other sites

If you have never tested the Analytics using a stock skin, please take just a brief moment to do so.

 

In admin, enable the ability to choose a skin from the storefront. Select Kurouto, do whatever is necessary to get the Analytics to (purportedly) log info, set the skin back, and disable the skin chooser.

 

I just want to eliminate the third-party skin as a possibility.

Link to comment
Share on other sites

Thank you for that suggestion bsmither.

 

I did as suggested and placed a couple orders using "vanilla" stock skin.  No ecommerce data was sent.  Thinking, it may take a while for google to display the data, I have waited about 24 hours and can still confirm that no ecommerce data is being sent.  So it doesn't appear to be the third party skin.  Where should I go now?

Link to comment
Share on other sites

This is what I would do next:

 

Knowing that the Analytics is javascript-based and thus is executed on the customer's browser, I would install a browser traffic monitor and watch for any traffic that the browser sends out or receives from www.google-analytics.com/analytics.js.

 

I am looking at the code in the template file main.php, and I see the javascript for the Analytics, so make sure you see the javascript by asking the browser to show you the source HTML of the page being displayed. The template surrounds the script code with {if $ANALYTICS}, so if this is false, there will be no script in the HTML sent to the browser.

 

I use Firefox and the Firebug add-on to troubleshoot problems. Firebug has a Net traffic monitor.

 

Please let us know your store's web address so we can try to catch the traffic from/to our browser.

Link to comment
Share on other sites

I have installed the firebug add-on and was able to find the traffic to and from https://www.google-analytics.com/analytics.js from non checkout pages.  This receives data response but I don't know how you make any sense out of that information.

 

I then went through and processed a transaction to get to the receipt page, that supposedly sends the data to google ua.  After I processed the transaction I actually got communication with "ecommerce.js" with the address "https://www.google-analytics.com/plugins/ua/ecommerce.js".  See the attached image.  Looking at that response it appears no transaction information is being sent over to google ua.  Is that what you see?

 

My site address is:

www.offshoremarineparts.com

 

Thank you for your help on this!


Sorry, I forgot the attachment.  Here ya go...

Link to comment
Share on other sites

With the Homepage, I see this (the GET collect after the GET analytics.js):

http://www.google-analytics.com/collect?
v=1&_v=j27&a=238539746&t=pageview&_s=1&
dl=http%3A%2F%2Fwww.offshoremarineparts.com%2F&
ul=en-us&de=UTF-8&
dt=Offshore%20Marine%20-%20Homepage&
sd=24-bit&sr=1600x1200&vp=1392x537&
je=1&fl=13.0%20r0&
_u=MEAAAEQB~&
cid=1479868829.1410899473&
tid=UA-9221357-1&
z=1060791655

I recognize some of the values.

 

All of this is in the querystring sent to google-analytics. So, I am confident that the info is at least getting sent, with a 200 OK response. Whether Google is applying it to the correct user account, I can't say.

 

As an aside, I see a blurb below your copyright for Havenswift Hosting. Did you personally add this in your admin, Store Settings, Copyright text field as a courtesy to Havenswift?

Link to comment
Share on other sites

Does the analytics.js pertain to ecommerce data or is that only for visitor stats / tracking?  If it is responsible for the visitor information (return customers, time on the site, etc) then you would be correct as all that data is showing in the google analytics.  The data that is missing is the ecommerce data that pertains to the number of transactions, sales amounts, etc.  In the previously attached image there is "No tracker found" and "Transaction id is a required field".  I cannot understand any of the rest of it but it seems to say that it didn't receive that data.  So it appears that ecommerce.js pertains to the transaction information.  I probably am wrong but figured I would mention it anyway.

 

I didn't put the havenswift link at the bottom of the page but I think Ian at havenswift placed it there.  It is hard coded in, not in the store settings.  Why do you ask?  Is it causing an issue?

Link to comment
Share on other sites

I find the 'ecommerce' script in the template file content.receipt.php. I have not yet confirmed if CubeCart automatically sends to the customer's browser the Receipt page after a successful transaction. Please let me know how your store behaves. (When CubeCart is working through the 'complete' step of the full transaction series of steps, the receipt page is shown to the customer.)

 

With the Net monitor active, log in to your customer account and click the link to see a receipt of a transaction. In the traffic list, look for a second GET to google-analytics after the GET ecommerce.js line. We are interested in the REQUEST headers.

Link to comment
Share on other sites

I know it's not in the js but there was a decent amount of changes made back in 5.2.11 to the skin/template/content.receipt.php file regarding the ecommerce analytics.  Perhaps that may point you in the right direction?

 

I have been hosted with Ian at Havenswift for a few years now.  He was doing some custom work for me back in V4 and I was very happy with the quality of work completed.  I decided to use his hosting and I am very glad I did.  The hosting and support he provides is second to none!  I have used others (I won't give names) that were so slooowww and support was the same.  His servers are blazing fast.  You would not go wrong steering anyone his direction.  By the way, he did ask me if I minded him putting the link there...for me the fact is that he has provided amazing support and decent priced hosting so it didn't bother me to advertise his service in the footer of my site.  By no means was it required.

Link to comment
Share on other sites

Ok, I will compare the skin code from CC5210 vs CC5213. Please watch the Net traffic monitor but NOT from looking at an order from your account's purchase history. The GA variables are not loaded into the skin for this action.

 

You were asked permission for the plug!!

Link to comment
Share on other sites

Guess the posts overlapped.  You are exactly right.  After a successful transaction the customer is sent to the receipt page or rather the "/index.php?_a=complete" page.  This page does have the ability to print the receipt as well.

 

Upon looking for additional entries after the ecommerce.js ...there are 3 additional pertaining to the analytics ecommerce data.  I have attached all three screenshots of "params".  It looks like the data is there (hopefully none of it is sensitive).  Let me know if you need something else in addition to these.


I completed a test order quite a bit earlier and have left the resulting success / receipt page open.  Therefore I have all the net traffic info from when that page was loaded.  Oops forgot the attachments again!

Link to comment
Share on other sites

So I just made use of a GA Debugger for Chrome.  It output the verbage you were looking for however it does appear the parameters you mentioned were in the previous images except as 1-3 letter abbreviations of sorts.

 

I think the issue has been found!!  If you look in the attached image below, look at around the 6th line there is a triangle next to "The tracking Id should only be of the format UA-NNNNNN-N".  However if you look up two lines "ga(create, 1, auto)" or go down a little further "trackingId" (&tid) both are set as "1".  This should be my GA tracking number.

 

As an additional test, I went in and removed "{/literal}{$ANALYTICS}{literal}" from the skin/templates/main.php and replaced it with my GA tracking code.  I then completed an order and there were no more warnings and the GA tracking code was correctly shown in the log.  I did go to google analytics to see if it received the data but nothing showed.  I believe it takes a bit for that information to populate on the GA side so I will check tomorrow.

 

So now the hunt to find where the issue lies in CC core code.  Perhaps the dashes are causing the issue?  Well hopefully this will be easier to find than the whole cause of this data not reporting!  Let me know what you come up with and I will test if necessary.  Thanks

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...