Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

StatCounter. Anyone using this Need Help


bsharke

Recommended Posts

Hi ...I wrote StatCounter Support this:

 

I have a website using oscommerce software with over 175 items for sale right at the moment with a lot more to follow. I have put the counter on my index page. Do I have to put this counter on every page that displays my item(s) in order for it to be counted. I could seem to find the answer. And they answer here:

 

Hello Bill,

 

Yes you need the counter on every page to count those pages. I know someone before used an include file when they had a lot of pages you might want to do the same thing.

 

Anyone know what file or contribution they have reference too. I haven't been able to find it in any search or browsing. Any replies will be greatly appreciated.

Thanks

 

Billy

Link to comment
Share on other sites

All counter programs, that I know of, make you use an image in their script. So, if you are using SSL, it will give you a warning message on your secure pages because it is having to get the image from an outside host program. Just FYI.

Contributions I used : Updated 06-13-04 23:42

----------------

Vote on My Graphis Poll

Link to comment
Share on other sites

No.....this is a pretty neat program for a counter. Take a look at. Actually they allow you to have it invisible. http://www.statcounter.com I am getting information that I have never had before from any other counter that I have tried. Best part of it is that it is free. I think they might be building a rather large base for now but what the hey.

Thanks

 

Billy

Link to comment
Share on other sites

  • 4 months later...
Actual for a stat counter, you can place it in either your includes/header.php or included/footer.php file and it will in essence be on 'every' page.

 

 

How exactly should we paste the code into the footer.php file? I know how to paste it into HTML, but not into php. Is there anything I should be aware of?

Link to comment
Share on other sites

  • 10 months later...

Like Tech, I need that question answered as well. If I have the HTML coding, where do I insert it into the header.php, or footer.php file??? So far I have tried just outside of the </table> and just inside of that code near the bottom with no luck. Thanks

Link to comment
Share on other sites

  • 1 year later...
Like Tech, I need that question answered as well. If I have the HTML coding, where do I insert it into the header.php, or footer.php file??? So far I have tried just outside of the </table> and just inside of that code near the bottom with no luck. Thanks

 

you need to do this

 

use Notepad to make a simple text file, call it something like my-counter.html and paste into it exactly the code generated by Statcounter's wizard. Save this file. to my-counter.html

then upload that to your domain root.

 

edit includes footer on the last line put this code

 

<?php include("path/my-counter.html"); ?>

 

where path/ is the relative path to the location of the file in relation to the path where the scripts are executed.

eg http://www.yourdomain.com/my-counter.html

 

this worked for me

Link to comment
Share on other sites

Statscounter features page;

 

Secure Tracking [upgraded Members Only]

If you run a secure site using a secure sockets layer (SSL), you can choose an option when installing your StatCounter code to ensure that it does not raise security alerts when visitors use your website.

Link to comment
Share on other sites

  • 7 months later...
All counter programs, that I know of, make you use an image in their script. So, if you are using SSL, it will give you a warning message on your secure pages because it is having to get the image from an outside host program. Just FYI.

 

Would you know how to put an IF statement before the counter, so as to not run statcounter when it is an SSL page?

thanks..

Link to comment
Share on other sites

Would you know how to put an IF statement before the counter, so as to not run statcounter when it is an SSL page?

thanks..

 

 

I found another thread that does this test for Google Adds.

http://www.oscommerce.com/forums/lofiversion/i...php/t76721.html

 

I used the following code and it works:

 

<?php if ($request_type == NONSSL) { /* only run statcounter NON SSL else it causes warning */

 

?>

<!-- Start of StatCounter Code -->

 

<!-- End of StatCounter Code -->

<?php } ?>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...