Skip to content

Update analytics query to show top 50 page views#460

Merged
JoeProgrammer88 merged 1 commit intomainfrom
Issue#459-TopPageViewsBug
Jan 14, 2026
Merged

Update analytics query to show top 50 page views#460
JoeProgrammer88 merged 1 commit intomainfrom
Issue#459-TopPageViewsBug

Conversation

@JoeProgrammer88
Copy link
Copy Markdown
Member

Closes #459

Summary

Fixed bug in Kusto query to pull top page views.

Copilot Summary

This pull request updates the Kusto query in the GetPageViewsAsync method of AnalyticsService.cs to improve how page view analytics are calculated and reported. The changes shift the focus from counting unique users to summarizing and ranking page views by page name, while also refining the filtering criteria.

Analytics query improvements:

  • Modified the query to summarize and order page views by page Name, returning the top 50 most viewed pages instead of counting unique users by UserId.
  • Updated the date formatting in the query to use the yyyy-MM-ddTHH:mm:ssZ format for startDate and endDate, ensuring correct time zone handling.
  • Added a filter to exclude entries where Name starts with /, likely to remove system or invalid page names from the analytics.
  • Removed the filter that only counted users with valid UserId, as the focus is now on page view counts rather than unique users.

Revised Kusto query to count and rank page views by Name, filtering out entries starting with '/'. Removed unique user counting by UserId. Improved date formatting in TimeGenerated filter for clarity.
@JoeProgrammer88 JoeProgrammer88 merged commit 08a07b3 into main Jan 14, 2026
1 check passed
@JoeProgrammer88 JoeProgrammer88 deleted the Issue#459-TopPageViewsBug branch January 14, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - Analytics: Top Page Views and Total Page Views

1 participant