Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Statcounter Code with Oscommerce


Guest

Recommended Posts

Hi,

 

I am trying to install statcounter.com's code onto my website to track visitor information. For those of you who do not have it, it's such an amazing tool to use. WAY better then any OSC contribution I have seen...and it's entirely free, but I don't know for how long because it sure impresses me with its capabilities. ANYWAY, to the main point...I have looked everywhere for answers to this. I need to insert their html code into footer.php so that it tracks each webpage (because footer.php appears on every page). I have tried adding the code outside of the last ?>, before that, tried placing <p>...code...</p> outside of the last ?>....and no luck. Can someone please help me figure this out. I think it's a great tool for everyone to use and know how to use as well. Thanks

Link to comment
Share on other sites

Think mine is in the catalog/index.php file, just put it at the bottom somewhere, not in a <?php ?> tag.

 

only problem is it always loads as http, so you get a warning when you try and load the homepage in https

Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Link to comment
Share on other sites

Thanks for the help. However, when i place it in catalog/index.php, it still does not seem to work properly. Any other suggestions?

Link to comment
Share on other sites

Thanks for the help.  However, when i place it in catalog/index.php, it still does not seem to work properly.  Any other suggestions?

 

 

This is my statcounter code, place it just after the </body> tag and just before the </html> tag, at the end of index.php in /catalog/:

 

<?php

if(empty($_SERVER['HTTPS'])) {

?>

<!-- Start of StatCounter Code -->

<script type="text/javascript" language="javascript">

var sc_project=xxxxxx; 

var sc_partition=x; 

var sc_security="xxxxxxxx"; 

</script>



<script type="text/javascript" language="javascript" src="http//www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img  src="http//c6.statcounter.com/counter.php?sc_project=xxxxxx&java=0&security=xxxxxxxx" alt="free site statistics" border="0"></a> </noscript>

<!-- End of StatCounter Code -->

<?php } ?>

Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...