Roadmap 0.13, Fixes
FX.804 Time in the browser apps: an anonymous usage-time metric for our analytics
Owner 2026-12-03: track how long people use the browser apps, anonymous, both /use and /lab.
Built (site only, live; no app repo changes): app-shell.inc loads assets/js/app-time.js on every /use and /lab app page (not in the desktop app or SuperCad's ?embed=1 frame). It counts seconds on screen and active seconds (on screen + click/key/scroll/touch/pointer move in the last 60 s) and sends them about once a minute and when the tab is hidden, by sendBeacon to POST /api/app-time (thin) -> AppUsage::beat -> table app_usage (migration 185): one row per page load keyed by a hash of a random in-memory key; app, build, area, audience (public/staff/tester/pass, a role only), device type, the day. No account, visitor id, cookie or IP stored; bots skipped; new sessions throttled 120/h per network; each report capped at 600 s, a session at 24 h. Lab reports need a signed-in member. Report: /admin/analytics 'Time in the apps' (AppUsage::summary in the stored analytics report; staff left out). Retention: bin/analytics-prune.php also prunes app_usage past 400 days when that job is on. /legal/privacy says what is counted (updated 3 Dec 2026; owner/legal to approve the wording).
Tested: in-process (rolled back) 10/10; live endpoint 204/400/404; Chromium on /use/cadcraft sent a 60 s beat and a hidden-tab beat (intercepted, nothing stored). Not tested: a real lab-pass session end to end.
Community comments
No comments yet
Add detail as we go: how you would use it, files or steps that show the problem, what other programs do. The team reads every comment.
Sign in or create a free account to add a comment.