WWW FAQs: How do I track my site's usage?


2003-08-18: although free "hit counters" are available from gostats.com and xcounters.com and other sources, all of these display ads, and none of them provide the highest quality statistical information. I do not recommend hit counters unless you are hosting your site on a free hosting provider that does not provide any better way to analyze your site activity. Hit counters require you to embed an image in your HTML which is fetched from the counter company's website; in most cases this image shows everyone in the world your hit count, which may not be what you want. Also, hit counters usually tell you nothing at all about where users are coming from, which of the many pages in your site they enjoyed most, what search keywords they were looking for when they found you, which external sites link to your site most, and so on. Finally, in some cases, when your visitors click on the hit counter they will be shown advertising for other companies.

Here's the good news: you probably have access to better information than this, without the need to tell the entire world statistics that you might prefer to keep private. Many web hosting companies include web server statistical reports as a standard part of your account, and you should check your web hosting company's "control panel" for links to statistical information about your site. In addition, if your hosting company allows you to download your website's "log file," which contains information about every access to your site, then you can analyze this information yourself with any of a long list of programs that produce excellent statistics. Free programs in this category include AWStats, Analog and Webalizer. Commercial products include WebTrends, Sawmill and Wusage (which I wrote).

Disclaimer: I am the author of a website statistics program. Therefore my opinions on this question are biased. They are also very well-informed!

Legal Note: yes, you may use sample HTML, Javascript, PHP and other code presented above in your own projects. You may not reproduce large portions of the text of the article without our express permission.

Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!