feat: add PostHog telemetry with type-safe event tracking

Track page views, project interactions, theme changes, external links, PGP actions, and errors. Console logging in dev when PostHog not configured. Requires PUBLIC_POSTHOG_KEY and PUBLIC_POSTHOG_HOST env vars.
This commit is contained in:
2026-01-14 12:25:10 -06:00
parent 08c5dcda3b
commit d360f2284e
16 changed files with 475 additions and 7 deletions
+3
View File
@@ -14,6 +14,9 @@ const config = {
alias: {
$components: "src/lib/components",
},
paths: {
relative: false, // Required for PostHog session replay with SSR
},
prerender: {
handleHttpError: ({ path, referrer, message }) => {
console.log(