Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

The marketdroids at my company want to know how many people how many pairs of eyeballs have seen our site in a given month. I was wondering what techniques any of you may have come across. A straight up ip-count from the access logs is probably a gross over-estimate due to dialups and DHCP. Cookies might be a better way to keep track but still offers plenty of room for misestimation.

Are there any techniques any of you have come across, or know are used for this type of marketing information.

TIA,
Jim

  • Comment on 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 Fastolfe (Vicar) on Nov 16, 2000 at 00:42 UTC
    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.

      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..."

      Fastolfe you are always the first one to post! :)

      Just kidding. Your's is probably a better answer than mine - friendlier anyway!
RE: How many unique people have viewed my website in the last month?
by $code or die (Deacon) on Nov 16, 2000 at 00:45 UTC
    Might I suggest trying www.statsmonks.org?

    Seriously though - if you really want to code your own stats package in perl - try looking in the Code Catacombs. Alternatively there are gazillions of stats packages on the net.

    I think the problem here is that this isn't really a perl related question, or at least it isn't phrased that way. Come back here with some perl code and people might be a bit more interested.

    Damn! I just wasted my last -- on this Anonymous Monk!
Re: How many unique people have viewed my website in the last month?
by little (Curate) on Nov 16, 2000 at 14:40 UTC