What is "user visits" on the admin dashboard?

I am trying to understand how many people are logging into my discourse every day, and tracking that from day to day. Is that the “user visits” stat, or does that include multiple visits by the same user?

Is there a way to see who precisely has logged in on a given day?

The closest I know of is by going to Users -> Active (currently not filterable by date)

Less that what I think you’re asking for, but depending on how many visitors you get and how often you check it might be of some help.

The /about page has the number of users who were seen in the last week+month.

That’s awesome - thanks! I had actually turned that page off for reasons that I will post in a new topic.

Does “user visits” only include logged in users, or does it include anonymous users as well?

Nope only registered, logged in users are counted there.

If “user visit” is only logged in users, is there a metric that tracks visits from everyone?

Yes, that is called Google Analytics :wink:

Or Mixpanel for analytics :).

Got it, “Total visits” metric is not in the /admin dashboard.

What does “User Visits” mean exactly?
If I go to the Discourse site, browse a bit, close the tab and come back an hour later in a new browser tab/window, while I am still the same person, same browser, will this count as 2 user visits or just 1?
What if I do the same, but my second visit is from a different device with the same user account?
What about users who are not logged in and only read? Do they count as user visits too?

BTW: The post below is not an answer, it lacks a precise definition of what the user visits are.

No. It means logged in users. You could be on 50 different devices and you are the same logged in user.

Not logged in users come through as anonymous users.

I think I am a little confused on how “User Visits” varies from “Logged In” pageviews.

My current understanding after reading a few different threads is:

User visits are unique logged in users that have been in the forum per the time period (today, yesterday, last 7 days, etc).
Logged In Pageviews are every pageview for those same logged in users.

So if a user was in the forum and viewed 10 different pages, their user visit would be 1 and logged in pageviews would be 10.

Please correct me if I am wrong.

Sounds about right to me!

@codinghorror 我正在使用数据探索器插件创建一个每日统计表格。关于 user_visits,一个用户在同一天是否可能有多次访问?还是说一天内的所有访问会被合并到同一行?我看到的每日访问次数最大值为 1,想知道是我的查询有误,还是这里确实存在限制。

感谢你们所做的一切 :slight_smile:

user_visits 表中,每个用户每天只能有一条记录。该表在 user_idvisited_at 上设有唯一索引。随着用户阅读更多帖子,当天访问记录的 posts_read 字段将会更新。

在哪里可以找到 Discourse 开始计算用户访问(即我们的)日期的时间——或者更准确地说,在哪里可以找到用户访问例行程序运行的时间?我们有一位用户一直在试图找出这个答案,但几个月来都未能成功。:slightly_smiling_face: 他似乎在上一季度错过了两天。

通常是 00:00 UTC,即服务器时间。

您好,

阅读完这个帖子后,我们仍然对“用户访问量”的含义感到有些困惑?这是指您选择的时间段内的独立用户吗?

例如,

这里显示我们在 2 月份有 286 次用户访问,但我们的论坛只有 97 位用户。

您能澄清一下吗?

谢谢,
Cat

您好 Cat,

在此回答您的问题:

用户访问报告显示了所选时间段内(今天、昨天、过去 7 天、本月等)论坛的总用户访问次数。

具体来说,只要有唯一的登录用户访问网站,就会计为一次用户访问,每天最多一次。

例如,如果一个用户在一周内每天都访问了网站,Discourse 会将其计为 7 次用户访问。这就是为什么一个月的用户访问次数可能比您网站的总用户数还要多的原因。

如果您感兴趣,也可以在此处查看此报告的 Ruby 代码:discourse/app/models/concerns/reports/visits.rb

希望这对您有帮助! :slightly_smiling_face: