TheHostingHeroes Posted July 9, 2008 Share Posted July 9, 2008 Hello I have the following integration code from GA <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"> var pageTracker = _gat._getTracker("UA-xxxxx-1"); pageTracker._initData(); pageTracker._trackPageview(); </script> this i have integrated in to my website and template on WHMCS for tracking. What code do I enter in to the tracking area on /orderforms/cart/complete.tpl i assume they should be some other code on google for updating the ecommerce side. I have looked around GA and couldn't find anything obvious. 0 Quote Link to comment Share on other sites More sharing options...
TheHostingHeroes Posted July 9, 2008 Author Share Posted July 9, 2008 I have since found this. for those also looking try: <script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-XXXXX-1"); pageTracker._initData(); pageTracker._addTrans( "$OrderID", // Order ID "$amount", // Total "$tax", // Tax "$ClientID", // Client ID "$Country" // Country ); pageTracker._addItem( "$OrderID", // Order ID "$Products", // Product Name "$amount", // Price ); pageTracker._trackTrans(); </script> 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted July 9, 2008 Share Posted July 9, 2008 Add it like this: {literal} <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"> var pageTracker = _gat._getTracker("UA-xxxxx-1"); pageTracker._initData(); pageTracker._trackPageview(); </script> {/literal} 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.