me23 Posted November 15, 2005 Share Posted November 15, 2005 Hello, Google Analytics was announced today (http://www.google.com/analytics/), and I'd like to install the necessary code on my OSC store. The only thing it requires is to insert a <script> snippet inside the <head> tags on every page. Can anyone tell me what OSC file to edit to add the necessary code on every page? Thanks! Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 15, 2005 Share Posted November 15, 2005 That would be most of the files in the root directory. Some don't have a head section (stylesheet.css) and some shouldn'be be seen by the SE's (checkout_oricess.php) but you will need to go through each to determine in which ones you want to place the code. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
rrodkey Posted November 15, 2005 Share Posted November 15, 2005 That would be most of the files in the root directory. Some don't have a head section (stylesheet.css) and some shouldn'be be seen by the SE's (checkout_oricess.php) but you will need to go through each to determine in which ones you want to place the code. Jack FYI ... Jack is right most files need mod's under the catalog directory. Add this after <title>: <?php if ($request_type == 'SSL') { ?> <script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct="UA-111111"; urchinTracker(); </script> <? } else { ?> <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct="UA-1111111"; urchinTracker(); </script> <? } ?> When someone figures out the looping for the items in the form regarding checkout_process.php let me know. Best Regards, Ryan Link to comment Share on other sites More sharing options...
me23 Posted November 16, 2005 Author Share Posted November 16, 2005 Great - thank you very much Ryan and Jack! I'll give it a try and if I can provide any follow-up advice, I'll do so here. Link to comment Share on other sites More sharing options...
sh1977 Posted November 16, 2005 Share Posted November 16, 2005 anyone got this wokring yet. I've added the code in above, with my details. Just waiting to see if my status changes now. Also wondering if it's a good idea to add this anyhow, is there anypoint, oscommerce can give you most of the info you need with contribs. What does everyone think. Link to comment Share on other sites More sharing options...
axioma Posted December 28, 2006 Share Posted December 28, 2006 That would be most of the files in the root directory. Some don't have a head section (stylesheet.css) and some shouldn'be be seen by the SE's (checkout_oricess.php) but you will need to go through each to determine in which ones you want to place the code. Jack how can I insert the google analitys code when I'm using the must have contrinution header tag controller module? Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 28, 2006 Share Posted December 28, 2006 It should go in includes/footer.php. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.