Analytics
2.4K members online now
2.4K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Ecommerce Tracking - No data coming through

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Cannot seem to get Ecommerce data, I am using the analytics.js code.  I am missing something but cannot seem to figure it out.  Below is the page source from my Thank you page.  Can anyone see what is wrong?

 

 <br />********************************<br /> Order Number is: CB6912<br /> Order Total: $32.59000<br />  
         <script type="text/javascript">
	    var gaJsHost = (("https:" == document.location.protocol ) ? "https://ssl." : "http://www.");
	    
	    ga('require', 'ecommerce', 'ecommerce.js');
	    ga('ecommerce:addTransaction', {
	      'id': '6912',   // Transaction ID. Required.
	      'affiliation': 'Closetbay',   // Affiliation or store name.
	      'revenue': '32.59000',   // Grand Total.
	      'shipping': '11.84',    // Shipping.
	      'tax': '0'           // Tax.
});
                	
	   ga('ecommerce:addItem', {
	       'id': '6912',
	       'name': '4ft Polished Chrome 1-1/16" Diameter Rod', // product name
	       'sku:': 'TUBE100-4-PC', // SKU/code - required      
	       ' ', // category or variation
	       'price': '15.75000', // unit price - required
	       'quantity': '1' // quantity - required
	   }); 
       	   	
	   ga('ecommerce:addItem', {
	       'id': '6912',
	       'name': 'Open Flange for 1-1/16" diameter Rod, Polished Chrome', // product name
	       'sku:': 'TUBE140-PC', // SKU/code - required      
	       ' ', // category or variation
	       'price': '2.50000', // unit price - required
	       'quantity': '2' // quantity - required
	   });    	 
   	  
         ga('ecommerce:send');      // Send transaction and item data to Google Analytics.
  </script>

 

1 Expert replyverified_user

Ecommerce Tracking - No data coming through

Top Contributor
# 2
Top Contributor

Hi Bill,

 

I see two problems, the empty value for the category breaks your javascript so the code is not getting executed. Also both items have the same id so only the last instance of the product with the same id will be sent to GA. Hope this helps, let me know if you have questions.

 


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Ecommerce Tracking - No data coming through

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hello Arnold, thanks for the reply.  I have fixed the category, it sure helps to have an extra pair of eyes to look at things.    As for the same id,  I thought the transaction id would be the same for all items purchased for this particular transaction?  The sku and name sets the items apart I thought?