Usage Tool
Overview
Section titled “Overview”The Usage tool provides executives with a GA4-style analytics dashboard to understand how the team uses Nucleus. It queries Cloudflare Analytics Engine to show page views, feature usage, and user activity trends.
Features
Section titled “Features”- Summary stats — Total page views, active users, average session duration, feature actions
- Daily trend chart — Area chart showing page views and feature uses over time
- Top pages — Horizontal bar chart of the 10 most visited pages
- Top features — Horizontal bar chart of the 10 most used features
- Active users leaderboard — Ranked list of users by total activity with progress bars
- Event stream — GA4-style live feed of recent user actions with avatars and timestamps
- User filtering — Select a specific user to see only their activity
- Time range — Toggle between 7-day, 14-day, and 30-day windows
Permissions
Section titled “Permissions”| Level | Access |
|---|---|
| Executive | Full access |
| Head | No access |
| Manager | No access |
| Lead | No access |
| Employee | No access |
This tool is executive-only. It uses requireExecutive() middleware on the API and <RequirePermission executive> on the frontend.
Data Source
Section titled “Data Source”Events are written to Cloudflare Analytics Engine (nucleus_events dataset) by:
- Page views — Automatically tracked on every route change via
src/routes/__root.tsx - Feature usage — Tracked in
onSuccesscallbacks of all mutation hooks (~170 mutations)
The Usage tool queries this data via the Analytics Engine SQL API (REST endpoint). See the Analytics Engine column mapping for field details.
Page Layout
Section titled “Page Layout”The page has two tabs:
Overview Tab
Section titled “Overview Tab”- 4 summary stat cards at the top
- Daily activity area chart
- Side-by-side top pages and top features bar charts
- Active users leaderboard (hidden when filtering to a single user)
Activity Tab
Section titled “Activity Tab”- Chronological event stream showing each action with:
- User avatar or event type icon (Eye for views, Zap for actions)
- User name and action description
- Tool badge and relative timestamp
URL Parameters
Section titled “URL Parameters”| Parameter | Values | Default |
|---|---|---|
days | 7, 14, 30 | 7 |
tab | overview, activity | overview |
user | User ID string | (all users) |
Sidebar Location
Section titled “Sidebar Location”Bottom section, between Templates and Settings. Only visible to executives.