How many viewers viewed a topic during a certain period?

If you have access to the rails console, you could try:

ssh root@example.org
cd /var/discourse
./launcher enter app
rails c
Topic.find(<topic-id>).views

But this is subject to the site setting topic view duration hours, so new topic visits are counted after N number of hours. Check this previous discussion about this Topic_views vs Topic.views - #6 by vinothkannans

You could also try tracking views with Google Tag Manager.

1 Like