Pageview implementation
- by The Elite Gentleman
Hi everyone
I want to add a pageview feature on my current web application. This page view is based on the count of user viewing the page. It must be unique, i.e. I must not view a person's page 10000 times and record it as 10000 views, just record 1 view instead.
My question is, should I base my pageview count on IP address? If not, what is/are the best approach in doing this?
I know that if the person has logged in to my system, I can simply use the user id stored in the session and check on the record if the user has/hasn't viewed the page and update accordingly. But for "anonymous" viewers, what is the best approach?
Thanks.
PS How does Youtube does it?