PostHog
Installing
Install the package;
npm install posthog-jsInitalize site-wide in your site.ts
import posthog from 'posthog-js'posthog.init('phc_YOUR_KEY', { api_host: 'https://us.i.posthog.com', person_profiles: 'identified_only' })// Init Posthog
// Only on non-staging pages
if (!window.location.host.endsWith('.webflow.io')) {
posthog.init('phc_YOUR_KEY', { api_host: 'https://us.i.posthog.com', person_profiles: 'identified_only' })
}
Usage Notes
Feature Flags
Experiments (A/B tests)
Last updated