Skip to content

feat: display view tracking start date on metrics page#2567

Merged
lukepayyapilli merged 1 commit intoMIT-LCP:devfrom
lukepayyapilli:feat/metrics-tracking-start-date
Jan 30, 2026
Merged

feat: display view tracking start date on metrics page#2567
lukepayyapilli merged 1 commit intoMIT-LCP:devfrom
lukepayyapilli:feat/metrics-tracking-start-date

Conversation

@lukepayyapilli
Copy link
Copy Markdown
Contributor

@lukepayyapilli lukepayyapilli commented Jan 27, 2026

Summary

Displays when view tracking began for a project on the metrics page, addressing the issue that view counts do not cover the entire history of all datasets.

Closes #2563

Changes

  • Extract tracking start date from existing views_over_time() data (no additional DB query).
  • Display "Views tracked since [Month Year]" on metrics page.
  • Add tests for tracking_start_date context.

Approach

Rather than adding a new method with a separate database query, we derive the tracking start date from the existing views_over_time() data that's already being fetched. The first month in that data is when tracking began. This follows the DRY principle and avoids unnecessary database queries.

Screenshots

Screenshot 2026-01-27 at 9 59 22 AM

The metrics page now shows:

Total number of unique registered users who have viewed this project. Views tracked since November 2025.

Copy link
Copy Markdown
Member

@tompollard tompollard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks

@lukepayyapilli lukepayyapilli added this pull request to the merge queue Jan 30, 2026
Merged via the queue into MIT-LCP:dev with commit a376291 Jan 30, 2026
7 checks passed
@lukepayyapilli lukepayyapilli deleted the feat/metrics-tracking-start-date branch January 30, 2026 13:52
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.

Metrics: Display view count tracking start date

2 participants