> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiJmNzEyZDgzMC00OGI4LTQ5YmUtODQxMy1jYjk5NWU3YjdkNmYiLCJleHAiOjE3NzgyNTk5NjYsImlhdCI6MTc3ODI1OTY2Nn0.rPIGLcqhAWGB04bhtJ6e28GwRO5mbGuh185F9ksz1YQ
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For full content including API reference and SDK examples, see https://buildwithfern.com/learn/llms-full.txt.

# 分析和集成

> 在 Fern Dashboard 中跟踪对您文档的 LLM 流量，并通过按钮和导航栏链接向读者展示 llms.txt 端点。

`llms.txt` 和 `llms-full.txt` 会自动为您的站点生成，但读者和 AI 工具如何发现它们取决于您。在 Fern Dashboard 中跟踪使用情况，并在您的文档中直接展示端点。

## 跟踪 LLM 流量

[Fern Dashboard](https://dashboard.buildwithfern.com/) 提供 `llms.txt` 使用分析，包括：

* 按 LLM 提供商（Claude、ChatGPT、Cursor 等）分类的流量
* Markdown 和 `llms.txt` 文件的机器人与人工访问者的页面级明细

## 向读者展示端点

要让人类读者能够发现端点，请添加按钮或导航链接：

<AccordionGroup>
  <Accordion title="为 SDK 文档添加按钮">
    为您的 SDK 文档添加一个按钮，链接到您 API Reference 的 `llms-full.txt`。使用 `lang` 将代码示例过滤为一种语言，使用 `excludeSpec=true` 排除原始 OpenAPI 规范。

    ```jsx Markdown
    <Button href="/api-reference/llms-full.txt?lang=python&excludeSpec=true" target="_blank">
      为 LLM 打开 Python API Reference
    </Button>
    ```

    这为用户提供了一个干净的、特定语言的输出，他们可以在编写代码时将其提供给 AI 工具。
  </Accordion>

  <Accordion title="为 llms-full.txt 添加下拉菜单">
    在导航栏中添加一个下拉菜单，链接到 `llms-full.txt` 的不同过滤版本，让用户轻松访问其偏好语言的 LLM 优化文档。

    ```yaml docs.yml
    navbar-links:
      - type: dropdown
        text: LLMs
        icon: fa-solid fa-robot
        links:
          - text: 完整文档
            href: /llms-full.txt
          - text: Python SDK
            href: /api-reference/llms-full.txt?lang=python&excludeSpec=true
          - text: TypeScript SDK
            href: /api-reference/llms-full.txt?lang=typescript&excludeSpec=true
          - text: Go SDK
            href: /api-reference/llms-full.txt?lang=go&excludeSpec=true
    ```
  </Accordion>
</AccordionGroup>