Add configurable Plausible analytics

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
michilis
2026-08-21 06:11:04 +02:00
co-authored by Cursor
parent 47e6537dde
commit be322cb0d8
4 changed files with 29 additions and 8 deletions
+10 -8
View File
@@ -540,14 +540,16 @@ so a systemd `Environment=` line or a one-off `PORT=9000 pnpm dev:api` still ove
### Web (`web/`)
| Variable | Default | Meaning |
| ---------------- | -------------------------- | --------------------------------------------- |
| `WEB_PORT` | `4321` | Dev server and preview port |
| `API_URL` | `http://127.0.0.1:8787` | API origin used at build time |
| `PUBLIC_API_URL` | empty (same origin) | API origin baked into markup and islands |
| `SITE_URL` | `https://cashumints.space` | Canonical origin for meta tags |
| `RELAYS` | see `shared/src/nostr.ts` | Relays for the build-time review fetch |
| `BONES_URL` | `http://localhost:$WEB_PORT` | Dev server `pnpm bones` captures against |
| Variable | Default | Meaning |
| ------------------ | ------------------------------------------------- | --------------------------------------------- |
| `WEB_PORT` | `4321` | Dev server and preview port |
| `API_URL` | `http://127.0.0.1:8787` | API origin used at build time |
| `PUBLIC_API_URL` | empty (same origin) | API origin baked into markup and islands |
| `SITE_URL` | `https://cashumints.space` | Canonical origin for meta tags |
| `PLAUSIBLE_URL` | `https://analytics.azzamo.net/js/script.js` | Analytics script URL; empty disables analytics |
| `PLAUSIBLE_DOMAIN` | `cashumints.space` | Domain reported to analytics; empty disables analytics |
| `RELAYS` | see `shared/src/nostr.ts` | Relays for the build-time review fetch |
| `BONES_URL` | `http://localhost:$WEB_PORT` | Dev server `pnpm bones` captures against |
`PORT` and `API_URL` have to agree: the build and the dev proxy reach the API at
`API_URL`, so moving the API off `8787` means changing both.