mirror of
https://github.com/pupperpowell/bibdle.git
synced 2026-04-05 17:33:31 -04:00
Add Rybbit analytics alongside Umami
- Load Rybbit script via app.html (recommended SvelteKit approach) - Mirror all Umami custom events (First guess, Guessed correctly, Share, Copy to Clipboard, social link clicks) with rybbit.event() - Identify logged-in users with name/email traits; anonymous users by stable UUID Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
() => dailyVerse.date,
|
||||
() => dailyVerse.reference,
|
||||
() => correctBookId,
|
||||
() => user?.id,
|
||||
() => user,
|
||||
);
|
||||
|
||||
let guessedIds = $derived(
|
||||
@@ -86,6 +86,7 @@
|
||||
(window as any).umami
|
||||
) {
|
||||
(window as any).umami.track("First guess");
|
||||
(window as any).rybbit?.event("First guess");
|
||||
localStorage.setItem(key, "true");
|
||||
}
|
||||
}
|
||||
@@ -209,6 +210,9 @@
|
||||
(window as any).umami.track("Guessed correctly", {
|
||||
totalGuesses: persistence.guesses.length,
|
||||
});
|
||||
(window as any).rybbit?.event("Guessed correctly", {
|
||||
totalGuesses: persistence.guesses.length,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user