Guest User

Google Analytics Ecommerce Tracking w/Volusion

a guest
Aug 21st, 2012
1,925
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- Google Analytics -->
  2. <script type="text/javascript" language="Javascript1.2">
  3. var gaJsHost = (("https:" == document.location.protocol) ? " https://ssl." : "http://www.");
  4. document.write("<" + "script type='text/javascript' src='" + gaJsHost + "google-analytics.com/ga.js'><" + "/script>");
  5. </script>
  6.  
  7. <script type="text/javascript" language="Javascript" name="Google Analytics">
  8. function v_ga_track(ga_account, trackDomainName, theDomainName) {
  9. var domainNameTracking = trackDomainName ? true : false;
  10. var pageTracker = _gat._getTracker(ga_account);
  11. pageTracker._initData();
  12.  
  13. if (domainNameTracking) {
  14. if (!theDomainName) {
  15. theDomainName = "http://www.YOURDOMAINHERE.com/".replace("https:","").replace("http:","");
  16. theDomainName = theDomainName.substring(2,theDomainName.length - 1);
  17.  
  18. }
  19. pageTracker._setDomainName(theDomainName);
  20. }
  21. pageTracker._trackPageview();
  22. try {
  23. pageTracker._addTrans(Order[0], "", Order[2], Order[4], Order[5], Order[6], Order[7], Order[8]);
  24. for (var i=0; i < OrderDetails.length; i++)
  25.  
  26. pageTracker._addItem(OrderDetails[i][0], OrderDetails[i][2], OrderDetails[i][3], OrderDetails[i][4], OrderDetails[i][5], OrderDetails[i][6]);
  27. pageTracker._trackTrans();
  28. }
  29. catch(e) {}
  30. }
  31. v_ga_track("UA-XXXXXXXX-X");
  32. </script>
  33. <!-- END Google Analytics -->
RAW Paste Data