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

# PostHog

在你的 `docs.json` 文件中添加以下内容，以将分析数据发送到 PostHog。

仅当你自托管 PostHog 时才需要包含 `apiHost`。默认情况下，我们会将事件发送到 `https://app.posthog.com`。

<CodeGroup>
  ```json docs.json 中的 Analytics 选项 theme={null}
  "integrations": {
      "posthog": {
          "apiKey": "YOUR_POSTHOG_PROJECT_API_KEY",
          "apiHost": "optional"
      }
  }
  ```

  ```json 示例 theme={null}
  "integrations": {
      "posthog": {
          "apiKey": "phc_TXdpocbYTeZVm5VJmMzHTMrCofBQu3e0kN7HGMNGTVW"
      }
  }
  ```
</CodeGroup>

<br />

<Warning>
  启用 PostHog 分析后，将会禁用 Mintlify 控制台中的分析功能。
</Warning>

<div id="session-recordings">
  ## 会话录制
</div>

在接收会话录制之前，你需要先将文档网站的 URL 添加到 Posthog 的“Authorized domains for recordings”。添加 URL 的选项位于 Posthog 的项目设置中。
