mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 19:49:40 +02:00
refactor(analytics): add module context to all Umami events
Resolves event name collisions in the unified app (e.g. view_changed, deck_created, search_performed) by adding a `module` property to every tracked event via createModuleTracker. Also fixes duplicate tracking in Planta routes (now only tracked in mutations.ts). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
779a8ba322
commit
5280cc6dc7
6 changed files with 260 additions and 224 deletions
|
|
@ -28,7 +28,7 @@ import {
|
|||
function trackAuth(event: string, data?: Record<string, string | number | boolean>): void {
|
||||
if (typeof window !== 'undefined' && (window as any).umami?.track) {
|
||||
try {
|
||||
(window as any).umami.track(event, data);
|
||||
(window as any).umami.track(event, { ...data, module: 'auth' });
|
||||
} catch {
|
||||
// Silently ignore tracking errors
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue