feat(analytics): add automatic auth event tracking via shared-auth

Add inline Umami tracking to @manacore/shared-auth authService for
login, signup, logout, SSO, and social auth events. Tracks both
success and failure with auth method metadata.

This automatically covers all web apps without any per-app code
changes. No-ops silently in environments without Umami (mobile, SSR).

Tracked events: login, login_failed, signup, signup_failed, logout,
password_reset_requested (with method: email/google/apple/sso)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-22 18:44:03 +01:00
parent 2c26fce736
commit f043db2b05
2 changed files with 44 additions and 2 deletions

View file

@ -67,6 +67,23 @@ injectUmamiAnalytics(html) → <script defer src="stats.mana.how/script.js" d
---
## Automatisches Auth-Tracking
Auth-Events werden automatisch in `@manacore/shared-auth` getrackt (alle Web-Apps):
| Event | Wann | Data |
|-------|------|------|
| `login` | Erfolgreicher Login | `{ method: 'email' \| 'google' \| 'apple' \| 'sso' }` |
| `login_failed` | Login fehlgeschlagen | `{ method: 'email' \| 'google' \| 'apple' }` |
| `signup` | Erfolgreiche Registrierung | `{ method: 'email' }` |
| `signup_failed` | Registrierung fehlgeschlagen | `{ method: 'email' }` |
| `logout` | Benutzer hat sich abgemeldet | - |
| `password_reset_requested` | Passwort-Reset angefragt | - |
Diese Events erfordern **keinen Code in den einzelnen Apps** — sie werden automatisch vom shared Auth-Service ausgelöst.
---
## Custom Event Tracking
### Installation