Who is online stats

Open to all! Ask other shopowners for help.
Post Reply
gabbysplaza
Member
Posts: 45
Joined: Tue Oct 26, 2021 5:33 pm
Phoenix Version:
Has thanked: 24 times
Been thanked: 2 times

Who is online stats

Post by gabbysplaza »

Howdy, I was wondering why the first column (online) of the who's online table always has time that does not match the time a visitor arrived on my website and left. I may be wrong, but isn't the first column supposed to give a total of the time a visitor was on the website? Or am I not understanding what this is for?

Untitled-1.jpg
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Who is online stats

Post by burt »

This is the time between the first action (entering your site) and the latest action (eg accessing a page).

It is not the full elapsed time of a visit (eg if the user does nothing for 30 minutes, this would not be recorded).
I am not here to build for you.
I am here to build with you. Let's help each other.
gabbysplaza
Member
Posts: 45
Joined: Tue Oct 26, 2021 5:33 pm
Phoenix Version:
Has thanked: 24 times
Been thanked: 2 times

Re: Who is online stats

Post by gabbysplaza »

burt wrote: Fri Jun 28, 2024 10:47 am This is the time between the first action (entering your site) and the latest action (eg accessing a page).

It is not the full elapsed time of a visit (eg if the user does nothing for 30 minutes, this would not be recorded).
Thanks @burt

This being the case, of what use is that time then? Forgive me but I don't quite understand how it's meant to help me or work. I am not querying it, I just don't understand that piece of data.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Who is online stats

Post by ecartz »

Not first and last. Time between now and the first action. If we changed it to first and last, all those examples would show 0.

Essentially what it's showing is that this was viewed at 10:44:58 and all those sessions are considered active. Active just means that they are less than fifteen minutes old. We don't have any way of knowing if the prospective customer is still looking at the page or not.

I don't know if it's terribly helpful. It just saves you having to subtract the time entered from the current time manually. That logic is more than eleven years old, being preserved through other changes.
gabbysplaza
Member
Posts: 45
Joined: Tue Oct 26, 2021 5:33 pm
Phoenix Version:
Has thanked: 24 times
Been thanked: 2 times

Re: Who is online stats

Post by gabbysplaza »

ecartz wrote: Fri Jun 28, 2024 10:58 am Essentially what it's showing is that this was viewed at 10:44:58 and all those sessions are considered active.
Thank you @ecartz

That was very helpful and made things clearer to me. That being the case, couldn't we just update that value to show when the URL was viewed as you explained? If the visitor waited 11secs to click a link on website, should the 11secs not be added to the entry time to get correct value for the last click?

If I have understood correctly, I have now updated the code to show values as shown in attached screenshot.

Untitled-1.jpg

Is this a correct reflection of values as they ought to be?
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply