visitors online to a web site

P

paul

How could I know how many visitors are visiting in the same time (connected)
in my website?
Thanks
Paul
 
B

Benjamin Niemann

Good morning,
How could I know how many visitors are visiting in the same time
(connected) in my website?

You can't. A visitor will download a document once (and then 'disconnect')
and this is all you could read from your server logs. Some users click away
quickly, some leave it open without looking at it, while others read it
word for word. With JS you could log when the document is closed, but this
cannot differ between case 2 and 3.

What you often see on websites (this seems to be a standard feature of
bulletin board, not sure if other kinds of sites are infected, too) is a
very rough and inaccurate approximation: the number of sessions with
activity in the last X minutes (X about 5).

HTH
 
C

carolyn

paul said:
How could I know how many visitors are visiting in the same time
(connected) in my website?
Thanks
Paul

You can set up a log-in/logout system, but there are no guarantees that they
will log out and not just browse away. You may also scare people away,
when they have to log into your site. Helps if you can justify it.

You may be able to write a script to scan the logs and determine the number
of visitors within the last 30 seconds to give an estimated number of users
that are still on site. Not a true reading, but a rough estimate.

Carolyn
 
A

Andy Dingley

paul said:
How could I know how many visitors are visiting in the same time (connected)
in my website?

Decide what you'd like as the answer, then choose a counting method
that gives you that answer. There are any number of ways of measuring
this, and they give a variety of "right" answers (and an even bigger
range of wrong answers).

What does "connected" mean? Downloaded the homepage within the last
minute?
Started a "session" that hasn't expired yet ? What does "user" mean?
Same IP address? Same browser/cookie? Same login credentials?

It's also not a very useful metric to measure. Why do you want it? To
count "customers" ? -- then count the number of checkouts, or the
number of viewed products. To measure server performance? - Then
measure HTTP traffic and don't worry if it's one or multiple users.

There are lots of ways to measure this (just web search) but when
comparing methods, it's important to keep a very clear idea about just
what each will measure, and whether that's a useful thing for you.

It's also pointless to measure something when you don't do anything
with the answer. If the "number of sessions" isn't causing someone in
marketing to redirect an ad budget, then why collect it at all? It's
hard and expensive to do, if it's not going to have a downstream
effect, then why bother at all?
 
M

mbstevens

paul said:
How could I know how many visitors are visiting in the same time (connected)
in my website?
Thanks
Paul
You can do it if all of your pages are server-side generated, since the
program that generates the pages will have various methods for
maintaining state. This could be expanded to test for visitors from
unique addresses and keeping a count. Errors could still be made, for
instance if you had several visitors coming in from behind the same
firewall, but I imagine the count would be within reason for some uses.

I occasionally visit sites that tell me how many visitors are on line.
My impression is that the administrators are patting themselves on the
back, but I suppose the information might also be useful if one wanted
to know if a forum had enough people present for a useful conversation
to ensue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top