• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Design issue Weekly & Monthly User activity stats

#1
Hey everybody,

i'm not sure if that's a bug or if i'm missunderstanding it. In my opinion if i have 1.000 Users active each day and those 1.000 users are the same on every day in a month at the end of the month i'm having 1.000 active users.

But the statistics page says i'm having 30.000 active users. ;)

Warm regards from Germany

Florian
 
#3
Yeah, i know. On other stats like new threads, posts, conversations,... that would be right but not on active users. A community with 5.000 registered users should have stats with 30.000 active users. ;)
 

Mike

XenForo developer
Staff member
#4
The system is designed around summing to get aggregate stats. This is (I think) the only stat that doesn't work that way. You would effectively need to divide but the number of days in the period.
 

RobParker

Well-known member
#5
You would effectively need to divide but the number of days in the period.
That's wrong isn't it?

A very simplified example:

Say you have 10 active users one day and 100 the next day. If the "month" was 2 days long, as it stands it'd return 110 as the value. Your advice is to half it to make it 55.

But in that month you've had at least 100 active unique users and potentially up to 110 unique users (assuming the 10 on day 1 didn't visit on day 2).
 

jeffwidman

Active member
#6
I used to run an analytics software company, and this uniques vs totals stuff was a major headache. Thankfully it's only this one metric.

Often you have to do a SELECT COUNT(DISTINCT object_id)... but in this case all you really need is:
Code:
SELECT COUNT(user_id) FROM xf_user WHERE last_activity >= [1st of the month] AND last_activity < [1st of next month]
 

jeffwidman

Active member
#8
Unfortunately, there's no way to retroactively get unique user logins if you're looking for a query you can run right now to get past months.
If this feature is implemented, then the results at the end of each month just need to be stored for future reference. Several other stats have the same issue, that's why the rebuild stats tool explicitly includes a warning next to "delete cached data" that once deleted, some of the past data can't be regenerated.
 

Joe Link

Well-known member
#9
Say I have a site with 10,000 users. If I wanted to see how many of those users logged in last month, how would I do that?
 

RDR

Well-known member
#10
Say I have a site with 10,000 users. If I wanted to see how many of those users logged in last month, how would I do that?
ACP > Users > Search for Users

Set the "Last visited between:" to 30 days ago and leave everything else default.

Click submit and you should get a list of users and in the bottom right will be your total count.