Skip to main content

Integrations

PostHog

Wire PostHog into every docs page — add your project api key to `integrations.posthog` and the script loads on next deploy.

Open-source product analytics with session recording, feature flags, and heatmaps. Self-hostable.

Configure

integrations.posthogstringpathrequired

PostHog 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 settingsProject 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 is app.posthog.com. If you need EU-region data, fork our integration or wait for the posthogHost override (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.com in script-src.

  • Removal: delete the integrations.posthog key (or blank it in the dashboard) and redeploy — the script disappears on the next page load.

Related

Was this page helpful?

Last updated August 7, 2026

PostHog | NookDocs | NookDocs