Skip to content

feat: add configurable Umami visitor analytics - #20

Merged
the-luap merged 1 commit into
mainfrom
feat/umami-analytics
Sep 8, 2026
Merged

the-luap merged 1 commit into
mainfrom
feat/umami-analytics

Conversation

@the-luap

@the-luap the-luap commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

Add optional Umami visitor analytics to the Usage portal, independently of the opt-in product reports submitted by PicPeak installations.

The tracker records visits and pageviews across the portal's SPA navigation, including browser back/forward. Standard Umami metrics cover referrers, campaigns, browser, device, language and approximate location. Named events count opening the main website, reading schemas and downloading source without delaying navigation or downloads.

Tracking is limited to known page paths. The before-send filter removes access tokens, lookup hashes, URL fragments, non-UTM query parameters, arbitrary event data and user identifiers. External referrers retain only their origin. Do Not Track, Global Privacy Control, Umami's browser opt-out and configured domain restrictions are respected. Analytics failures leave the portal usable. The English and German transparency page explains the separate website statistics.

Configuration

Requires Umami 2.18 or newer. Set UMAMI_SCRIPT_URL and the portal's UMAMI_WEBSITE_ID in the container environment. UMAMI_DOMAINS defaults to usage.picpeak.app. Settings are read at runtime; no frontend rebuild is needed. Both tracking values are empty by default, so tracking remains disabled until configured.

The public configuration endpoint exposes only these public tracker settings. CSP permits only the explicitly configured tracker origin for scripts and connections. Invalid configuration fails startup with an actionable error. Deployment variables are included in .env.example and compose.yaml.

Validation

  • npm run test:required: 125 backend/integration tests and 46 browser tests passed, including PostgreSQL and the same pinned PicPeak client used by CI.
  • Eight new browser cases also passed against Umami's actual tracker, with all collection requests intercepted locally: SPA navigation/back/forward, attribution filtering, private links, privacy preferences, domain restrictions, unavailable tracking and nonblocking clicks.
  • Source archive round-trip and privacy regression checks passed; the tracker helper is included in the downloadable source.
  • No Markdown files or private task notes are included.

@the-luap
the-luap merged commit 5664879 into main Sep 8, 2026
2 checks passed
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.

1 participant