Measuring traffic

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

Measuring traffic

Post by jaymoore_299 »

What is a good way to measure traffic? I was thinking about this method.

Get ip address
store ip address in database table, delete entry after 30 minutes.
check if ip address is found in database,
if it is, then do not count this
if ip address is not found in database, then add this as a new visitor

some surfers share ip addresses, so this method would not count those coming from the same ip address within 30 minutes.

There are the terms unique versus raw hits. What is the difference between them? Would the above method be the former?
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

Please read: http://www.analog.cx/docs/webworks.html

Among other things on that well written explanation of how the web works..
You can't tell how many visitors you've had.
You can't tell how many visits you've had.
You often can't tell where they entered your site, or where they found out about you from.
You can't follow a person's path through your site.
You can't tell how they left your site, or where they went next.
It explains why for each as well, and should clear up many of the questions you have.

"Unique hits" is misleading, although it means that some form of formula has been applied to the raw hits to make it more likely to represent a true user. (Such a thing is almost completely inaccurate, as the above link explains in detail).

Raw hits is plain, simple, http accesses.
Post Reply