More accurate web analysis

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm trying to more accurately track visitors on one of my sites.  Most of
the visitors are from offices where they share an IP address.  So, from one
IP address, there might be 10 or more individual users. Instead of tracking
unique IP addresses, I'd like to be able to track:

the number of unique vistors per month
the number of first time visitors (first time ever) per month
and then page hits per month for each individual page as well as the site

When it comes to tracking users, the Apache logs seem to track only IP
addresses so 10 users sharing the same office IP address only seem to
register as 1 unique visitor.  I was using cookies to track individual
computers, but if the user does not accept the cookie, the counts start to
go way off.

Hopefully someone has some ideas on how to more accurately count individual
computers rather than just individual IP addresses.


Re: More accurate web analysis

Quoted text here. Click to load it

You don't really have many options here.  Apache, as you found, only
logs IP addresses, so you can't really use that metric.  However, if you
force people to authenticate with a username and password, you'll be
able to track that unless they share usernames and passwords.  If it's
their unique username and there's a company policy against sharing
passwords (make it a termination offense), you'll have what you need.

Since there's no unique way to track users of shared computers, this may
be your only way for a unique users metric.  It's up to management to
decide if this is important to them to track this information as they'll
have to enforce rules for you to get it.  If they aren't willing to do
this, you have no other way to track unique hits from shared computers.

DeeDee, don't press that button!  DeeDee!  NO!  Dee...

Re: More accurate web analysis

Quoted text here. Click to load it

  In that case, may use custom log format. More info here

|  Just another PHP saint  |
Email: rrjanbiah-at-Y!com

Re: More accurate web analysis

Quoted text here. Click to load it

You can't tell how many people are in front of any given monitor.
Many people have more than one computer.
Many computers are shared between people.
Many computers get a new IP address every time they dial up.

Quoted text here. Click to load it

You can't do this face-to-face with any of (and probably not
with combinations of):
    - Names on a picture ID (names change, many users have "John Smith")
    - Credit card numbers (users have multiple credit cards, and they
        can change banks, and people occasionally share credit cards)
    - Driver's license numbers (people move between states)

so how on Earth could you do it over the web?

Quoted text here. Click to load it

Use PHP sessions.  They CAN work without cookies by passing the
session ID in the URL.  This isn't ideal, but PHP can do better
than cookies alone.  Also, session IDs may help out tracking dialup
users whose IP addresses change every time they dial up, if they
accept cookies.

Be aware that many browsers will not keep cookies over a long time.
Some can be set to lose cookies when the browser is closed.  (ALL
cookies are session cookies whether you want it or not.) Some users
erase cookies periodically, even if they accept them for one session.
You might be able to track the user as he wanders around your site
for one, er, session, but not track him between visits weeks apart.

Test if a user accepts cookies (set it on the main entry page; test
it on a later page.  Can you set cookies on a redirect, and expect
them to be set at the destination page?).  You can come up with
multiple stats:  pessimistic: all users that don't accept cookies
from the same IP are considered as one, and optimistic:  all users
that don't accept cookies from the same IP are considered different.
Reality is between the two.

Quoted text here. Click to load it

Is it a different computer if I change out the CPU?

                    Gordon L. Burditt

Site Timeline