FEATURE: topic_view_stats table with daily fidelity (#27197)

This gives us daily fidelity of topic view stats

New table stores a row per topic viewed per day tracking
anonymous and logged on views

We also have a new endpoint `/t/ID/views-stats.json` to get the statistics for the topic.
This commit is contained in:
Sam
2024-05-27 15:25:32 +10:00
committed by GitHub
parent 6cafe59c76
commit d1191b7f5f
9 changed files with 214 additions and 11 deletions

View File

@ -1583,6 +1583,9 @@ Discourse::Application.routes.draw do
constraints: HomePageConstraint.new("#{filter}"),
as: "list_#{filter}"
end
get "/t/:topic_id/view-stats.json" => "topic_view_stats#index"
# special case for categories
root to: "categories#index",
constraints: HomePageConstraint.new("categories"),