Open-source product analytics with session recording, feature flags, and heatmaps. Self-hostable.
Configure
integrations.posthogstringpathrequiredPostHog Project API key. Script injects via <Script strategy="afterInteractive"> and loads from https://app.posthog.com.
{
"integrations": {
"posthog": "phc_abc123..."
}
}Where to find your project api key
PostHog project → Project settings → Project API key (starts with phc_).
Or set it from the dashboard — Editor → Configurations → AI & Advanced → Integrations.
Gotchas
EU residents using
eu.posthog.com— the default host isapp.posthog.com. If you need EU-region data, fork our integration or wait for theposthogHostoverride (roadmap).
Loading behavior
Strategy:
afterInteractive— injected after page interactivity, so it never blocks first paint.CSP: if you enforce a Content Security Policy, allowlist
https://app.posthog.cominscript-src.Removal: delete the
integrations.posthogkey (or blank it in the dashboard) and redeploy — the script disappears on the next page load.
Related
Schema reference —
integrations— auto-generated field listing