scarletttam Posted July 5, 2012 Share Posted July 5, 2012 Hi, I was trying to find the right spot to put my google analytics code. It says put the code onto every page that I want to track immediately before </head> tag . I want to track my product pages. <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-xxxxxxx-x']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> Link to comment Share on other sites More sharing options...
multimixer Posted July 5, 2012 Share Posted July 5, 2012 What osCommerce version are you using? My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
scarletttam Posted July 5, 2012 Author Share Posted July 5, 2012 @@multimixer 2.3 :) Link to comment Share on other sites More sharing options...
♥Biancoblu Posted July 5, 2012 Share Posted July 5, 2012 I put mine in includes>footer.php, so it covers all pages. ~ Don't mistake my kindness for weakness ~ Link to comment Share on other sites More sharing options...
scarletttam Posted July 5, 2012 Author Share Posted July 5, 2012 @@Biancoblu Thank you so much. It worked :) Link to comment Share on other sites More sharing options...
♥Biancoblu Posted July 5, 2012 Share Posted July 5, 2012 you're welcome :) ~ Don't mistake my kindness for weakness ~ Link to comment Share on other sites More sharing options...
multimixer Posted July 6, 2012 Share Posted July 6, 2012 In version 2.3.1, you don't need to change any file, there is a module for that available, under admin>modules>header tags Install the googe analytics module and then just type your google number into there My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.