The “User Visits” count in the admin dashboard may be much higher than the “Active User” count shown on the /about
page as these are measuring different things.
Active Users is the number of unique users that logged in the site in a given time period while User Visits counts visits from the same user on different days.
Additional details
Active Users
In the about page, the Active Users counts are taken from
active_users_last_day
active_users_7_days
active_users_30_days
Which are counts, based on the last_seen_at date
active_users_last_day: User.where('last_seen_at > ?', 1.days.ago).count
active_users_7_days: User.where('last_seen_at > ?', 7.days.ago).count
active_users_30_days: User.where('last_seen_at > ?', 30.days.ago).count
The last_seen_at
is updated according to the user’s activity, any request made while the user is logged in is considered an activity, including reading. So the last_seen_at date is update multiple times during the user session (source code).
In summary, Active Users is the number of unique users that logged in the site.
User Visits
In the admin dashboard, the User Visits metric counts the daily logins, cumulatively. In the following example, 3 users visited today (logged in or visited the site while being logged in) and 2 visited yesterday. They may be the same or different users. So, in the last couple of days there were 5 visits total.
Further exploration
To differentiate users who only read content (lurkers) from more engaged users (those who like posts, create topics, etc) you can use data explorer queries, find some useful ones here: How to measure active users? - #5 by HAWK