- Advertising or other messages
There are other decisions that have to be made about it, though. First, a hit counter can count each page view or it can count unique visitors to the site. The former is a good way to measure the popularity of a page (based on how often people come back to it) but the latter is a better measure of the reach of a site to a larger audience.
Second, like Cascading Style Sheets, the hit counter code may be put into the head section of the document or simply referenced to a ".js" document hosted on your site. If only one page is going to have the counter on it (such as the index page of a site) it may be easiest to simply include the code within the page. On the other hand, if there are several pages that will reference the hit counter, having each of them reference the .js file using code such as
can save page loading time especially for larger sites.
If you don't have the inclination or skills to create your own hit counter, there are many sites on the web ready to assist with the task. Usually they will begin by providing you with a series of drop-down menus containing the various options, such as:
- Display type (pageloads or unique visitors)
- Minimum number of digits (this can be important on high-traffic sites)
- Counter digit color
- Counter background color
- Counter digit font
This is not necessarily a bad thing; it's entirely possible that this is a safe website. However, it is worthwhile to take the time to find out what they are doing with the information you give when you register. It may be a simple newsletter containing valuable information; it may be a series of annoying but benign spam emails that get sent to the contact web address.
Roll Your Own
For more information about website resources and tools like counters, check out the following LoveToKnow articles.