> ## 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.

# Google Tag Manager

> 将 Google Tag Manager 集成到你的 Mintlify 文档，集中管理分析标签、转化跟踪和营销事件。

将你的 tag ID 添加到 `docs.json` 文件，我们会将 Google Tag Manager 脚本注入到你所有页面中。

如有需要，你需要通过 Google Tag Manager 配置 Cookie 同意横幅。

<CodeGroup>
  ```json docs.json 中的 Analytics 选项 theme={null}
  "integrations": {
      "gtm": {
          "tagId": "required"
      }
  }
  ```

  ```json 示例 theme={null}
  "integrations": {
      "gtm": {
          "tagId": "GTM-MGBL4PW"
      }
  }
  ```
</CodeGroup>
