Files
hyggecraftery-web/lib/posthog.ts
Tim Leikauf 0101447d84 Add PostHog analytics — full event tracking across all pages
Tracks pageviews, hero/CTA clicks, product teaser clicks, app card
and detail views, newsletter signups, nav interactions, and footer
link clicks with structured properties for PostHog dashboards.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 20:59:29 +02:00

14 lines
351 B
TypeScript

import posthog from 'posthog-js'
export function initPostHog() {
if (typeof window !== 'undefined' && !posthog.__loaded) {
posthog.init('phc_BHgg9S7CQqVShe7EMCdi86PxA49qcNaTsR9Nn5EGxRCT', {
api_host: 'https://analytics.hyggecraftery.com',
capture_pageview: false,
persistence: 'localStorage',
})
}
}
export { posthog }