Typed event tracking with PostHog + Supabase fallback
Privacy-friendly analytics with a typed event catalogue (20 events), PostHog wrapper with lazy initialization, user identification, usePageTracking() hook for automatic Next.js route tracking, a Supabase self-hosted fallback, and ready-made SQL queries for DAU, WAU, conversion funnel, and retention cohorts.
posthog-js1track('purchase_completed', { blockId: 'auth', amount: 19 })2 3identifyUser(session.user.id, { email: session.user.email, role: 'user' })4 5var(--text-3);font-style:italic">// usePageTracking() in providers.tsx auto-tracks all route changesShort excerpt. Full block includes SQL migrations, error handling, RLS policies, and complete file structure.
One-time Β· Instant GitHub access
βInstant GitHub repo access
βOwn the code forever
βFree updates
User management, revenue analytics, feature flags
Beautiful transactional emails via Resend
Editable profiles with avatar upload