> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-docs-automation-github-pr-review.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Mixpanel

> 将 Mixpanel 集成到你的 Mintlify 文档站点，以跟踪产品分析、用户行为漏斗和内容参与事件。

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

```json Analytics options in docs.json theme={null}
"integrations": {
    "mixpanel": {
        "projectToken": "YOUR_MIXPANEL_PROJECT_TOKEN"
    }
}
```

将 `YOUR_MIXPANEL_PROJECT_TOKEN` 替换为你的 Mixpanel 项目 token。你可以在 [Mixpanel 项目设置](https://mixpanel.com/settings/project) 中找到该值。

<div id="data-residency">
  ## 数据驻留
</div>

如果你的 Mixpanel 项目托管在欧盟或印度的数据驻留区域，请设置 `region`，让事件直接发送到对应的 Mixpanel 接入主机。省略 `region` 将保留默认的美国主机。

```json 在欧盟数据驻留区域使用 Mixpanel theme={null}
"integrations": {
    "mixpanel": {
        "projectToken": "YOUR_MIXPANEL_PROJECT_TOKEN",
        "region": "eu"
    }
}
```

支持的取值：

* `us`（默认）：`api.mixpanel.com`
* `eu`：`api-eu.mixpanel.com`
* `in`：`api-in.mixpanel.com`

请将该值设置为与你的 Mixpanel 项目所在的数据驻留区域一致。如果事件发送到与项目区域不匹配的主机，它们会被丢弃。

<div id="tracked-events">
  ## 跟踪的事件
</div>

Mintlify 会自动跟踪以下用户交互：

* 页面访问
* 搜索查询
* 反馈提交
* 上下文菜单交互
* 导航点击

如果你在 Mixpanel 中看不到事件，请确认你的项目 token 是否正确，并检查是否有内容安全策略（CSP）阻止 Mixpanel 脚本运行。
