Saas usage dashboard
@usagemetrics/saas-usage-dashboard
Turn a product events CSV (timestamp, account_id, user_id, event) into one self-contained HTML dashboard: DAU, WAU, MAU, stickiness, active accounts, top features, activation rate, weekly retention, and accounts trending down. No external scripts; open it in any browser or attach it to an email.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
- 1---
- 2name: saas-usage-dashboard
- 3description: Build a single-file HTML product usage dashboard from a raw events export (timestamp, account_id, user_id, event). Shows DAU, WAU, MAU, stickiness, active accounts, top features, activation rate, weekly retention, and accounts trending down, with inline charts and no external scripts. Use when the user asks for a usage dashboard, product analytics, "how are customers using the product", DAU or MAU, stickiness, engagement, feature adoption, or has an events export from their app, warehouse, or analytics tool.
- 4license: MIT
- 5---
- 7# SaaS usage dashboard
- 9One command, one HTML file. The file has no external scripts or fonts, so it opens anywhere, works offline, and can be attached to an email or dropped in a shared drive. The numbers come from a script, so they are the same every time.
- 11## Inputs
- 13An events CSV in `data/` with these columns (extra columns are ignored):
- 15```csv
- 16timestamp,account_id,user_id,event
- 172026-10-30T09:12:00Z,acme-co,acme-u1,created_report
- 18```
- 20- `timestamp`: ISO date or datetime, or unix seconds. Times are read as UTC.
- 21- `account_id`: the customer (company or workspace). `user_id`: the person.
- 22- `event`: the action name. Use the product's own names; snake_case reads best.
- 24Where to get it: a warehouse query (`select occurred_at as timestamp, account_id, user_id, event_name as event from events where occurred_at >= now() - interval '120 days'`), an analytics tool's raw export, or the app's own event log. 90 to 120 days of history gives every chart enough data.
- 26Ask the user:
- 281. **What is "activated"?** The one action that means a new user got value (for example `shared_dashboard`). If they do not know, use the default: active on 3 or more distinct days in the first 14 days.
- 292. **Which events are noise?** Logins and page views are ignored for features by default (`login,logout,session_start,page_view,signup,signed_up`). Add others with `--ignore`.
- 303. A title for the page (company or product name).
- 32## Steps
- 341. Check the file: row count, date range, distinct accounts and users, and the 15 most common events. Point out obvious issues (test accounts, internal users, bots) and offer to filter them into a new file `data/events-clean.csv` before building.
- 352. Run:
- 37 ```bash
- 38 node scripts/usage-dashboard.mjs data/events.csv --activation-event shared_dashboard --title "Acme usage" --out out/usage-dashboard.html
- 39 ```
- 41 Other options: `--as-of 2026-10-30` (defaults to the last day in the data; pick a weekday or a full day if the export ends mid-day), `--activation-days 14`, `--ignore login,page_view,heartbeat`.
- 423. Tell the user where the file is (`out/usage-dashboard.html`) and give a five-line read-out from `out/usage-dashboard.json`: MAU and its change, stickiness, activation rate, the top feature, and the accounts trending down.
- 434. Offer next steps that fit what you saw: the `retention-cohorts` kit for monthly or account-level retention, `activation-funnel` to see where new users drop, or `customer-health-score` for the accounts trending down.
- 45## How to read it (include when sharing)
- 47- **Stickiness** = average DAU over the last 30 days / MAU. Under 15% is light use, 20 to 30% is healthy for most B2B tools, over 40% is a daily habit.
- 48- **Activation** only counts users first seen at least `--activation-days` ago, so new users are not counted as failures.
- 49- **Weekly retention** is per first-seen week: the share of that cohort active in each later week. The current, partial week is blank.
- 50- **Trending down:** accounts with at least 20 events in the prior 28 days whose events or active users fell 30% or more in the last 28 days, or with no events for 14 days.
- 52## Output template (chat read-out)
- 54```markdown
- 55Dashboard: out/usage-dashboard.html (as of 2026-10-30)
- 56- MAU 42 (-2% vs prior 30 days), WAU 32, DAU 14. Stickiness 25%.
- 57- Activation 59% (did shared_dashboard within 14 days).
- 58- Top feature: created_report, used by 98% of MAU.
- 59- Trending down: bluebird-labs (quiet 21 days), harbor-retail (-64% events), juniper-bank (-43%).
- 60```
- 62## Guardrails
- 64- Events often carry user emails or names in IDs. Do not paste raw rows into chat; the dashboard shows IDs only in the accounts table.
- 65- Do not upload the events file or the dashboard anywhere. The user shares the HTML file.
- 66- If more than 1% of rows are skipped (bad timestamp, missing user), stop and show examples before trusting the numbers.
