> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-han-update-changelogs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# PostHog

Add the following to your `mint.json` file to send analytics to PostHog.

You only need to include `apiHost` if you are self-hosting PostHog. We send events to `https://app.posthog.com` by default.

<CodeGroup>
  ```json Analytics options in mint.json
  "analytics": {
      "posthog": {
          "apiKey": "required",
          "apiHost": "optional"
      }
  }
  ```

  ```json Example
  "analytics": {
      "posthog": {
          "apiKey": "phc_TXdpocbYTeZVm5VJmMzHTMrCofBQu3e0kN7HGMNGTVW"
      }
  }
  ```
</CodeGroup>

<br />

<Warning>
  Enabling PostHog analytics will disable the analytics on the Mintlify dashboard.
</Warning>

## Session Recordings

You need to add the URL for your docs website to Posthog's "Authorized domains for recordings" before you can receive session recordings. The option to add your URL is in Posthog's project settings.
