Stats Discrepancies

Hey there!

I’m accessing certain user profile and the likes received number there is totally different to what is shown when I go to admin’s view of that profile and scroll down to the stats section.

Here are the numbers:

Screenshot 2020-08-19 at 18.16.55 Screenshot 2020-08-19 at 18.17.11

2 Likes

One of them is within a moving time window.

It’s not. Both of them are all-time stats at least that’s what the UI communicates

Yep, in doing some more checking I am also finding other odditeties.

I checked a newer user on a site I have admin rights.
The user joined 30 days ago.

On their public profile - https://<site>/u/<user>/summary - it shows image

On the admin page - https://<site>/admin/users/<user id>/<user> - it shows
image

Since the user has only been active on one topic and has several post I checked all of the post. They have not given a like or received a like.

I did not look at any personal messages.

Isn’t this because public profile is just public topics and admin counts likes in PMs ?

6 Likes

I guess that’s not a question to mee as I haven’t developed that feature :smiley: Maybe. But it’s another time we experience data discrepancies because of either some lack of proper UX and communication from the UI or something else.

It would be great @Falco if you can confirm that for sure so we can be 100% set on that. Thanks!

1 Like

The stats that you see on the user’s summary page are taken from the user_stats table. The likes_given, likes_received, post_count and topic_count fields in that table all refer to activity that happens in regular topics - activity from PMs is excluded from the results. For reference, see discourse/app/models/user_action.rb at main · discourse/discourse · GitHub.

The stats that you see on a user’s admin page include counts from PMs, so you can expect the results for likes_given, likes_received, post_count and topic_count to be different in the two places.

If the user completed the New User Tutorial, they will have given and received 1 like in a PM. Those likes will show up on the user’s admin page, but they will not be displayed on the user’s Summary page because they occured in a PM. You can also expect the Posts Created count to be higher on a user’s admin page than they are on their Summary page if the user has responded to the tutorial.

3 Likes