mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
fbdd913d8e
* Add translation tracker for stale translations audit Generated-By: mintlify-agent * translations: add missing pages and update content for es, fr, zh Phase 1: Add translations for 4 new API analytics pages (feedback-by-page, searches, views, visitors) in es, fr, and zh. Phase 2: Update 3 pages with content changes: - agent/workflows: add "Disable a workflow" subsection - ai/skillmd: add 24-hour generation note - editor/publish: add AI PR title tip, reformat publishing workflows, promote "Publish your changes" heading from h3 to h2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * update descriptions * translations * translations * translations * Delete TRANSLATION_TRACKER.md * translations * a * a * translations * translations * translations * translations * translations * translations * translations * translations * Update use-cases.mdx * translations * translations * Update ai-native.mdx * Update accordions.mdx * Update accordions.mdx * Update accordions.mdx * translations * translations * Update fonts.mdx * translations * translations: update SEO descriptions for es, fr, zh (150 pages) Update the description: frontmatter field across 150 pages × 3 languages to match the current English descriptions updated on 2026-03-31. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
65 lines
1.9 KiB
Plaintext
65 lines
1.9 KiB
Plaintext
---
|
||
title: "PostHog"
|
||
description: "将 PostHog 集成到你的 Mintlify 文档站点,使用 API 密钥跟踪产品分析、功能使用情况和用户行为。"
|
||
keywords: ["PostHog 集成", "产品分析", "功能开关", "自托管 PostHog"]
|
||
---
|
||
|
||
在你的 `docs.json` 文件中添加以下配置,将 Analytics 数据发送到 PostHog。
|
||
|
||
只有在自托管 PostHog 时才需要包含 `apiHost`。默认情况下,我们会将事件发送到 `https://app.posthog.com`。
|
||
|
||
<CodeGroup>
|
||
|
||
```json docs.json 中的 Analytics 选项
|
||
"integrations": {
|
||
"posthog": {
|
||
"apiKey": "YOUR_POSTHOG_PROJECT_API_KEY",
|
||
"apiHost": "optional",
|
||
"sessionRecording": true
|
||
}
|
||
}
|
||
```
|
||
|
||
```json 示例
|
||
"integrations": {
|
||
"posthog": {
|
||
"apiKey": "phc_TXdpocbYTeZVm5VJmMzHTMrCofBQu3e0kN7HGMNGTVW"
|
||
}
|
||
}
|
||
```
|
||
|
||
</CodeGroup>
|
||
|
||
<div id="configuration-options">
|
||
### 配置选项
|
||
</div>
|
||
|
||
<ParamField path="apiKey" type="string" required>
|
||
你的 PostHog 项目 API key。必须以 `phc_` 开头。
|
||
</ParamField>
|
||
|
||
<ParamField path="apiHost" type="string">
|
||
你的 PostHog 实例的 URL。仅在自托管 PostHog 时必填。默认为 `https://app.posthog.com`。
|
||
</ParamField>
|
||
|
||
<ParamField path="sessionRecording" type="boolean" default="true">
|
||
启用或禁用会话录制。将其设为 `false` 可在保持 Analytics 启用的同时禁用会话录制。
|
||
</ParamField>
|
||
|
||
<div id="session-recordings">
|
||
## 会话录制
|
||
</div>
|
||
|
||
在配置 PostHog 时,会话录制默认开启。若要在保持 Analytics 启用的情况下禁用会话录制,请在配置中将 `sessionRecording` 设置为 `false`。
|
||
|
||
```json Disable session recordings
|
||
"integrations": {
|
||
"posthog": {
|
||
"apiKey": "phc_your-key",
|
||
"sessionRecording": false
|
||
}
|
||
}
|
||
```
|
||
|
||
在接收会话录制之前,你需要将文档网站的 URL 添加到 PostHog 的“录制授权域名”(Authorized domains for recordings)。添加 URL 的选项位于 PostHog 的项目设置中。
|