mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-21 17:30:58 +08:00
Makes the redesigned dashboard Site traffic section real for the core
traffic summary.
- In scope: live pageview headline, comparison trend, logged-in share
KPI, and stacked traffic chart.
- Out of scope: top referrers, top countries, and narrative traffic
insights. Those remain placeholder UI for a follow-up.
- Reuses the existing report stacked chart for both the dashboard
section and `/admin/reports/site_traffic`.
- Extends the existing site traffic report data contract instead of
introducing a dashboard-only chart shape.
- Keeps traffic aggregation, KPI calculation, and trend eligibility on
the backend.
- Supports dashboard preset and custom date ranges with inclusive date
windows.
- Ships traffic data in this section payload shape:
```json
{
"id": "traffic",
"data": {
"kpis": {
"browser_pageviews": {
"value": 30,
"percent_change": 900,
"comparison_period": {
"start_date": "2026-04-28",
"end_date": "2026-04-30"
}
},
"logged_in_share": {
"value": 33
}
},
"pageview_series": [
{
"req": "page_view_logged_in_browser",
"label": "Logged in",
"color": "#4B3CE0",
"data": [
{ "x": "2026-05-01", "y": 10 }
]
}
]
}
}
```
|
||
|---|---|---|
| .. | ||
| admin_logins.rb | ||
| associated_accounts_by_provider.rb | ||
| bookmarks.rb | ||
| consolidated_api_requests.rb | ||
| consolidated_page_views.rb | ||
| consolidated_page_views_browser_detection.rb | ||
| daily_engaged_users.rb | ||
| dau_by_mau.rb | ||
| emails.rb | ||
| flags.rb | ||
| flags_status.rb | ||
| likes.rb | ||
| mobile_visits.rb | ||
| moderator_warning_private_messages.rb | ||
| moderators_activity.rb | ||
| new_contributors.rb | ||
| notify_moderators_private_messages.rb | ||
| notify_user_private_messages.rb | ||
| post_edits.rb | ||
| posts.rb | ||
| profile_views.rb | ||
| signups.rb | ||
| site_traffic.rb | ||
| storage_stats.rb | ||
| suspicious_logins.rb | ||
| system_private_messages.rb | ||
| time_to_first_response.rb | ||
| top_ignored_users.rb | ||
| top_referred_topics.rb | ||
| top_referrers.rb | ||
| top_traffic_sources.rb | ||
| top_uploads.rb | ||
| top_users_by_likes_received.rb | ||
| top_users_by_likes_received_from_a_variety_of_people.rb | ||
| top_users_by_likes_received_from_inferior_trust_level.rb | ||
| topic_view_stats.rb | ||
| topics.rb | ||
| topics_with_no_response.rb | ||
| trending_search.rb | ||
| trust_level_growth.rb | ||
| user_flagging_ratio.rb | ||
| user_to_user_private_messages.rb | ||
| user_to_user_private_messages_with_replies.rb | ||
| users_by_trust_level.rb | ||
| users_by_type.rb | ||
| visits.rb | ||
| web_crawlers.rb | ||
| web_hook_events_daily_aggregate.rb | ||