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 日に複数の訪問を持つことは可能でしょうか?それとも、1 日中のすべての訪問が同じ行にまとめられるのでしょうか?私は 1 日あたりの最大訪問数を 1 として確認していますが、これはクエリに誤りがあるのか、それとも実際にこの値に制限があるのか気になっています。

いつもありがとうございます :slight_smile:

user_visits テーブルでは、ユーザーは 1 日につき 1 つのエントリしか持つことができません。このテーブルには user_idvisited_at に対してユニークインデックスが設定されています。その日の訪問における posts_read フィールドは、ユーザーがさらに多くの投稿を読むたびに更新されます。

Discourse がユーザーの訪問に対して日付のカウントを開始する時刻はどこで確認できますか?より正確には、ユーザー訪問ルーチンが実行される時刻はどこで確認できますか?数ヶ月間、あるユーザーがその確認を試みましたが、まだ見つけることができていません :slightly_smiling_face: 彼は過去四半期に 2 日間、訪問記録を逃しているようです。

通常、これはサーバー時刻である UTC 00:00 です。

こんにちは。

このスレッドを読んだのですが、「ユーザー訪問数」が何を意味するのか、まだ少し混乱しています。選択した期間のユニークユーザーということでしょうか?

例えば、

ここでは2月に286回のユーザー訪問があったとありますが、フォーラムのユーザーは97人しかいません。

明確にしていただけますでしょうか?

よろしくお願いいたします。
Cat

こんにちは、Catさん。

ご質問への回答はこちらです。

User Visits report は、選択した期間(今日、昨日、過去7日間、月など)のフォーラムにおける合計ユーザー訪問数を示します。

具体的には、ユーザー訪問は、ログインしたユニークユーザーがサイトを訪問するたびにカウントされ、1日あたり1回までとします。

例えば、ユーザーが1週間に毎日サイトを訪問した場合、Discourseはそれを7回のユーザー訪問としてカウントします。このため、月間のユーザー訪問数がサイトの総ユーザー数よりも多くなる可能性があります。

ご興味があれば、このレポートのRubyコードもこちらでご覧いただけます。discourse/app/models/concerns/reports/visits.rb

お役に立てれば幸いです!:slightly_smiling_face: