PostHog

View as Markdown

Integrate PostHog to track user behavior and analytics in your documentation, including page views, feature usage, and user interactions.

1

Get your PostHog API key

You can find your PostHog API key under your project settings.

2

Add PostHog to docs.yml

In your docs.yml file, add your PostHog configuration:

docs.yml
1analytics:
2 posthog:
3 api-key: ${POSTHOG_API_KEY}
3

(Optional) Configure a custom endpoint

If you use a custom PostHog endpoint, add it to your configuration:

docs.yml
1analytics:
2 posthog:
3 api-key: ${POSTHOG_API_KEY}
4 endpoint: ${POSTHOG_API_HOST} # e.g. https://analytics.example.com or https://eu.i.posthog.com