Analytics
5K members online now
5K 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 Revenue Not Tracking

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello there, 

 

My name is Abraham.

 

We are trying to track ecommerce revenue from our webstores. We can see the data being sent from our "orderconfirmation.aspx" page source but the revenue is still at $0 in google analytics. 

 

1. Ecommerce is turned on

2. Enhanced ecommerce is also turned on

3. Goals has been set up.

4. This is our header script

 

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-123456789', 'betastore.nhm.org');
  ga('require', 'ecommerce', 'ecommerce.js');
  ga('require', 'displayfeatures');
  ga('require', 'linkid', 'linkid.js');
  ga('send', 'pageview');

</script>

5. Our ecommerce script

 

 

<script type="text/javascript">
	_gaq.push(['_addTrans',
	'[@Order.OrderID]', 
	'[@Order.OrderAmt]' 
	]);
	[@FOREACH:OrderLines]
	_gaq.push(['_addItem',
	'[@Order.OrderID]', 
	'[@OrderLine.PLU]', 
	'[@OrderLine.Description]', 
	'[@OrderLine.Amount]', 
	'[@OrderLine.Quantity]' 
	]);
	[@NEXT]
_gaq.push(['_trackTrans']);
  
</script>

 

 

 

<script type="text/javascript">
	_gaq.push(['_addTrans',
	'3881', 
	'24.00' 
	]);
		_gaq.push(['_addItem',
	'3881', 
	'NWAAD00181', 
	'NHM Adult Admission', 
	'12.00', 
	'2' 
	]);
		_gaq.push(['_addItem',
	'3881', 
	'', 
	'Payment', 
	'-24.00', 
	'1' 
	]);
	_gaq.push(['_trackTrans']);

Any help would be greatly appreciated. 

 

Thanks,

Abe

 

1 Expert replyverified_user

Re: Ecommerce Revenue Not Tracking

Top Contributor
# 2
Top Contributor
Hi Abraham,

You are using the Universal Analytics tracking code (what is fine) but for ecommerce tracking you are using the classic analytics code. The two does not work together. You need to update your ecommerce tracking code like described in the doc below:
https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#overview

Or if you want to implement enhanced ecommerce tracking:
https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce

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