separator

Take a quiz or make one of your own
Article 3 - Web Hit Counter Using an Image Tag
What's Next?
We've now talked about two different ways of counting page views on a website. The first is using SSI to execute a count program prior to rendering the page to the client, the second is using the HTML image tag to execute a server side count program and then output a 1 pixel blank image to the page.
You can chose either method depending upon your server setup and preference, they're both one-liners that you add to each of the pages on your site. Of course we're still missing lots of stuff. Like knowing WHICH page has been viewed, when, where the visitor came from, and maybe even a little bit of information about who they are.
We'll cover all that in future tutorials, but for now I want to point out something you've probably already thought of. If the purpose of having a count of page views is to see how many times your site is being seen, shouldn't you be counting only hits by people other than yourself? How can that be done? The answer is one simple word, cookies. And that will be the subject of our next tutorial.

separator

© www.thecgibin.com