an ASP.NET Open Source CMS & eCommerce platform
Search:
Last Post 11/13/2009 9:04:03 AM By 4safety. 2 replies.
11/10/2009 10:07:51 AM
4safety
Posts: 124
Joined: 5/11/2009
google analytics
Luke,
 
I have this placed on the home page and for some reason am not seeing ecommerce info such as dollar amounts and info in google analytics is something wrong here?
 
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-******-*");
pageTracker._trackPageview();
pageTracker._addTrans(orderId, affiliation, total, tax, shipping, city, state, country);
pageTracker._addItem(orderId, sku, name, category, price, quantity);
pageTracker._trackTrans();
} catch(err) {} </script>
11/11/2009 11:13:08 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: google analytics
It's better to place the ecommerce information in the order completion page where has the orderId, pricing information etc. Also you will need to use javascript to get the orderId and pricing information.
DotShoppingCart Staff
11/13/2009 9:04:03 AM
4safety
Posts: 124
Joined: 5/11/2009
Re: google analytics
 I am unfamiliar with how to do this. any chance you can steer me in the right direction.