tropiland Posted October 28, 2008 Share Posted October 28, 2008 Hello to all, I've been trying to add my StatCounter code <!-- Start of StatCounter Code --> <script type="text/javascript"> var sc_project=xxxxxxx; var sc_invisible=1; var sc_partition=50; var sc_click_stat=1; var sc_security="74a18a15"; </script> <script type="text/javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><div class="statcounter"><a title="hit counter" href="http://www.statcounter.com/" target="_blank"><img class="statcounter" src="http://c.statcounter.com/xxxxxx/x/xxxxxxx/x/" alt="hit counter" ></a></div></noscript> <!-- End of StatCounter Code --> and my Analytics code <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-xxxxxxx-x"); pageTracker._trackPageview(); </script> by simply incerting it into the end of the footer.php file but keep on getting errors. Can anyone tell me what am I doing wrong and/or what other code do I need to incert with the above tracking code to make it work? Thank you in advance for your time and consideration. Link to comment Share on other sites More sharing options...
web-project Posted October 28, 2008 Share Posted October 28, 2008 modify the footer.php file in the /catalog/includes/ folder Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you. Link to comment Share on other sites More sharing options...
tropiland Posted October 29, 2008 Author Share Posted October 29, 2008 modify the footer.php file in the /catalog/includes/ folder What does "modify" the footer.php file mean? I've been modifying by entering the code at the end but I get error messages all the time. Can you tel me how to enter the tracking code into the footer.php without getting those error messages? Thanx Link to comment Share on other sites More sharing options...
germ Posted October 29, 2008 Share Posted October 29, 2008 The only reason you can be getting errors is if you're inserting it into a PHP section of the code. If all else fails, try putting the code AFTER the closing PHP tag at the end of the file: ?> And a word to the wise, if you have SSL enabled, your stat counter script will cause the "non-secure" items popup in IE. :( But there are ways around that. Post if you need help doing that. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
mysolarshop Posted November 6, 2008 Share Posted November 6, 2008 Jim, I was also having trouble adding my stat counter code to my footer.php file. I then added the code after the closing PHP tag at the end of the file per your suggestion. It seems to be working that way. How I go about getting rid of the "non-secure" popup? Thanx, Donna Link to comment Share on other sites More sharing options...
germ Posted November 6, 2008 Share Posted November 6, 2008 <?php if ( $request_type == 'NONSSL' ) { ?> ******** DELETE THIS LINE AND PUT YOUR STAT COUNTER CODE HERE ******** <?php } ?> If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
mysolarshop Posted November 6, 2008 Share Posted November 6, 2008 Thank you Jim for the fast reply. That worked great. Thanx, Donna Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.