Skip to content

feat: add aggregated dashboard with sparklines and per-website stats#4056

Open
petebytes wants to merge 2 commits into
umami-software:masterfrom
Apsion:feat/overview-dashboard
Open

feat: add aggregated dashboard with sparklines and per-website stats#4056
petebytes wants to merge 2 commits into
umami-software:masterfrom
Apsion:feat/overview-dashboard

Conversation

@petebytes

@petebytes petebytes commented Feb 27, 2026

Copy link
Copy Markdown

Summary

Populates the existing empty /dashboard route with an aggregated multi-website dashboard, restoring the overview functionality from v2 that many users have been requesting.

  • Aggregate stat cards (unique visitors, page views, bounce rate, visit duration) with sparkline trend charts
  • Per-website stats table with favicon, visitor + pageview sparklines, bounce rate, and visit duration
  • Clickable website names that drill down to individual website details
  • Date range filter defaulting to last 30 days
  • Dashboard link added to side and mobile navigation
image

Closes #3362
Closes #3951

Test plan

  • Log in and navigate to /dashboard from sidebar
  • Verify aggregate stat cards show correct totals across all websites
  • Verify sparkline charts render for visitors and page views (both aggregate and per-website)
  • Change date range filter and confirm stats update
  • Click a website name in the table and confirm it navigates to /websites/{id}
  • Test on mobile viewport — dashboard link appears in mobile nav
  • Verify empty state when no websites exist

Populate the existing empty /dashboard route with an aggregated
multi-website dashboard. Includes:

- Aggregate stat cards (visitors, page views, bounce rate, visit duration)
  with sparkline trend charts
- Per-website stats table with favicon, visitor/pageview sparklines,
  bounce rate, and visit duration
- Clickable website names that link to individual website details
- Date range filter defaulting to last 30 days
- Dashboard link added to side and mobile navigation

Closes #3362
Closes #3951
@vercel

vercel Bot commented Feb 27, 2026

Copy link
Copy Markdown

@petebytes is attempting to deploy a commit to the Umami Software Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a comprehensive aggregated dashboard view with sparkline charts and multi-website statistics. The implementation includes stat cards showing total visitors, page views, bounce rate, and visit duration, along with a detailed per-website table with trend visualizations.

Key Changes:

  • Added dashboard navigation links to both mobile and sidebar menus
  • Implemented date range filtering with 30-day default
  • Created reusable SparkLine component using Chart.js for trend visualization
  • Built DashboardView that fetches and aggregates stats across all websites (up to 100)
  • Added StatCard and WebsiteStatsTable components for displaying metrics

Critical Issue:

  • StatCard.tsx has a runtime bug where .toLocaleString() is called on string values (bounce rate and visit duration), which will crash when these cards render

Confidence Score: 2/5

  • This PR contains a critical runtime bug that will cause crashes when displaying bounce rate and visit duration statistics
  • The implementation is well-structured and the navigation changes are solid, but there's a critical type error in StatCard.tsx line 27 where .toLocaleString() is called on string values. This will cause JavaScript runtime errors when the bounce rate ("50%") and visit duration ("1m 30s") cards attempt to render. This bug blocks the core dashboard functionality and must be fixed before merge.
  • Pay close attention to src/app/(main)/dashboard/StatCard.tsx which contains the critical runtime bug

Important Files Changed

Filename Overview
src/app/(main)/MobileNav.tsx Added dashboard navigation link with icon to mobile menu
src/app/(main)/SideNav.tsx Added dashboard navigation link with icon to sidebar menu
src/app/(main)/dashboard/DashboardPage.tsx Implemented page layout with date range filter and DashboardView integration
src/app/(main)/dashboard/DashboardView.tsx Core dashboard logic with aggregated stats, fetches data for all websites and calculates totals
src/app/(main)/dashboard/SparkLine.tsx Sparkline chart component using Chart.js for visualizing trend data
src/app/(main)/dashboard/StatCard.tsx Stat card component with critical bug: calls .toLocaleString() on string values causing runtime error
src/app/(main)/dashboard/WebsiteStatsTable.tsx Table component displaying per-website statistics with sparklines and formatted metrics

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Start[User navigates to /dashboard] --> DashboardPage[DashboardPage Component]
    DashboardPage --> DateFilter[DateFilter Component]
    DashboardPage --> DashboardView[DashboardView Component]
    
    DashboardView --> FetchWebsites[Fetch websites API<br/>/me/websites]
    FetchWebsites --> CheckWebsites{Websites<br/>exist?}
    CheckWebsites -->|No| EmptyState[Show empty state]
    CheckWebsites -->|Yes| FetchStats[For each website:<br/>Fetch stats & pageviews APIs]
    
    FetchStats --> AggregateData[Aggregate data across<br/>all websites]
    AggregateData --> CalculateMetrics[Calculate totals:<br/>visitors, pageviews,<br/>bounce rate, duration]
    
    CalculateMetrics --> RenderCards[Render 4 StatCards]
    RenderCards --> StatCard1[Unique Visitors<br/>+ SparkLine]
    RenderCards --> StatCard2[Page Views<br/>+ SparkLine]
    RenderCards --> StatCard3[Bounce Rate]
    RenderCards --> StatCard4[Visit Duration]
    
    CalculateMetrics --> RenderTable[Render WebsiteStatsTable]
    RenderTable --> TableRows[For each website:<br/>Stats + 2 SparkLines]
    
    StatCard1 --> BUG[🐛 Bug: .toLocaleString<br/>on string values]
    StatCard3 --> BUG
    StatCard4 --> BUG
Loading

Last reviewed commit: 60736f9

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

7 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread src/app/(main)/dashboard/StatCard.tsx Outdated
String values like bounce rate ("45%") and visit duration ("1m 30s")
should be displayed as-is, while numeric values get locale formatting.
@DaanDeReus

Copy link
Copy Markdown

Please fix this, this is awesome!

@petebytes

Copy link
Copy Markdown
Author

Hi team! Just checking in on this PR — it's been open for a few weeks now and there seems to be some community interest. Is there anything else I should update or change to help move this forward? Happy to address any feedback. Thanks!

@mikecao

mikecao commented Mar 29, 2026

Copy link
Copy Markdown
Member

The dashboard path is now a custom board so this PR will need to be modified to fit the new functionality. I do like the the sparklines, so they can probably be incorporated into the existing board components.

@petebytes

Copy link
Copy Markdown
Author

Thanks for the feedback! Happy to rework this to fit the boards architecture. The main value here is the aggregated multi-website overview (totals + per-site breakdown), so I'm thinking this would work well as a pre-built board type that ships out of the box. Will rebase once the boards branch lands.

@AlbertoMontalesi

Copy link
Copy Markdown

Looking forward to this getting merged, I have a bunch of websites and this would be very neat to have.

@fusion94

Copy link
Copy Markdown

i'm tracking something like 20+ properties and getting this in ASAP would be super useful

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.

[Feature Request] Add an Aggregated Dashboard View for Multiple Websites Default dashboard missing in v3

5 participants