/ Published in: JavaScript
Make sure you change the variable v_ga_track near the end of the script.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!-- Google Analytics --> <script type="text/javascript" language="Javascript1.2"> var gaJsHost = (("https:" == document.location.protocol) ? " https://ssl." : "http://www."); document.write("<" + "script type='text/javascript' src='" + gaJsHost + "google-analytics.com/ga.js'><" + "/script>"); </script> <script type="text/javascript" language="Javascript" name="Google Analytics"> function v_ga_track(ga_account, trackDomainName, theDomainName){ var domainNameTracking = trackDomainName ? true : false; var pageTracker = _gat._getTracker(ga_account); pageTracker._initData(); if (domainNameTracking) { if (!theDomainName) { theDomainName = "Config_FullStoreURL".replace("https:", "").replace("http:", ""); theDomainName = theDomainName.substring(2, theDomainName.length - 1); } pageTracker._setDomainName(theDomainName); } pageTracker._trackPageview(); try { pageTracker._addTrans(Order[0], "", Order[2], Order[4], Order[5], Order[6], Order[7], Order[8]); for (var i = 0; i < OrderDetails.length; i++) pageTracker._addItem(OrderDetails[i][0], OrderDetails[i][2], OrderDetails[i][3], OrderDetails[i][4], OrderDetails[i][5], OrderDetails[i][6]); pageTracker._trackTrans(); } catch (e) { } } v_ga_track("***CHANGE ME****"); </script>