Re: Count online users question
| From: | Kim Steinhaug | Date: | Thu, 27 Nov 2003 20:21:27 +0000 |
| Subject: | Re: Count online users question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171231@lists.php.net to get a copy of this message | ||
Cookies, or browsersession. I found the latter to be very
easy to work with.
--
Kim Steinhaug
---------------------------------------------------------------
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
---------------------------------------------------------------
"Al" <php.newsgroups@allysays.com> wrote in message
news:20031127005705.2729.qmail@pb1.pair.com...
> > I am trying to figure an accurate way to calculate how many users are
> > viewing a site, at any particular time. This task is very simple except
> for
> > one part - How do you determine when a person has left the site...apache
> > hasn't served anymore requests from a particular ip for xx minutes ??
>
> Hi Mike,
>
> There is no surefire way to measure the exact time a user leaves your
site.
> The most accurate way I can think of would be to use a hidden frame on all
> your pages that refreshes itself every X seconds. When a user has not
> requested that special tracking page for more than X seconds, you can
assume
> they have 'left' the site.
>
> However this solution seems like overkill for most purposes: you'll be
> wasitng server resources and slowing down your users' experience on your
> site.
>
> In response to your proposed method, most advertising associations
> (including the US-based Internet Advertising Bureau) and web analytics
> companies (such as Red Sherrif, Nielsens and Hitwise) define the end of a
> user session on a website when there is 30 minutes without a further
request
> for a page from the site.
>
> And while you may be tempted to track only IP numbers, remember that many
> users are behind shared IP numbers (e.g. firewalls) which may skew your
> stats. You would be better off using cookies on user's machines to
identify
> them and log their accesses to a DB.
>
> Hope that helps,
>
> Al