in reply to How many unique people have viewed my website in the last month?

There's no 100% reliable way to get this information and still keep the site available to the general public. Most techies are interested only in the hits the server takes, which means the access logs are quite sufficient. Your best option is to generate a unique ID number for each visitor and store it in a cookie on the browser. This would let you build up a profile of each visitor, frequency of visits, etc. The only thing you have to watch out for are users that are unable or unwilling to accept cookies. The percentage is small but significant.

Also, lots of people tend to frown on cookies that "track" their movements, even if it's on one web site, despite the fact that the same information is typically available in the access logs keyed on IP. Watch what you do with these strange new powers.

As HTTP is state-less, any method to tack any sort of persistent or state information (either session-based or user-based) is a hack. The only "sure" way of knowing how many users visit your site is to have each user register, and use something like HTTP authentication to log them in. 99% of the time this is overkill and only serves to keep people away from your site. If you have a lot of content, though (like nytimes.com), you can afford to do this.

  • Comment on RE: How many unique people have viewed my website in the last month?

Replies are listed 'Best First'.
RE: How many unique people have viewed my website in the last month?
by tune (Curate) on Nov 16, 2000 at 14:13 UTC
    I think neither method is perfect. So you better apply all of them, and calculate an average.

    Cookies are not very good because:

    • not everybody turns on them
    • some people are using more machine, and more browser, they will be counted multiple

    unique IDs from access logs are also not the easy way to the eternity, why:

    • there are gateways and proxies presenting unknown number of users
    • robots used to request pages

    ...and many other pitfalls, so i recommend the averaging method, or trust it on webalizer and other professional (and free:) stuff.

    -- tune "turn off the light, take a deep breath, and relax..."

RE: RE: How many unique people have viewed my website in the last month?
by $code or die (Deacon) on Nov 16, 2000 at 00:46 UTC
    Fastolfe you are always the first one to post! :)

    Just kidding. Your's is probably a better answer than mine - friendlier anyway!