|
| 1 | +--- |
| 2 | +title: Analytics and integration |
| 3 | +description: Track LLM traffic to your docs in the Fern Dashboard and surface llms.txt endpoints to readers with buttons and navbar links. |
| 4 | +--- |
| 5 | + |
| 6 | +`llms.txt` and `llms-full.txt` are generated automatically for your site, but how readers and AI tools discover them is up to you. Track usage in the Fern Dashboard and surface endpoints directly in your docs. |
| 7 | + |
| 8 | +## Track LLM traffic |
| 9 | + |
| 10 | +The [Fern Dashboard](https://dashboard.buildwithfern.com/) provides analytics for `llms.txt` usage including: |
| 11 | +- Traffic by LLM provider (Claude, ChatGPT, Cursor, etc.) |
| 12 | +- Page-level breakdowns of bot vs. human visitors for Markdown and `llms.txt` files |
| 13 | + |
| 14 | +## Surface endpoints to readers |
| 15 | + |
| 16 | +To make endpoints discoverable to human readers, add buttons or navigation links: |
| 17 | + |
| 18 | +<AccordionGroup> |
| 19 | +<Accordion title="Add a button for SDK docs"> |
| 20 | +Add a button to your SDK docs that links to the `llms-full.txt` for your API Reference. Use `lang` to filter code examples to one language, and `excludeSpec=true` to exclude the raw OpenAPI specification. |
| 21 | + |
| 22 | +```jsx Markdown |
| 23 | +<Button href="/api-reference/llms-full.txt?lang=python&excludeSpec=true" target="_blank"> |
| 24 | + Open Python API Reference for LLMs |
| 25 | +</Button> |
| 26 | +``` |
| 27 | + |
| 28 | +This gives users a clean, language-specific output they can feed to AI tools when writing code. |
| 29 | +</Accordion> |
| 30 | + |
| 31 | +<Accordion title="Add a dropdown for llms-full.txt"> |
| 32 | +Add a dropdown in your navbar that links to different filtered versions of `llms-full.txt`, making it easy for users to access LLM-optimized documentation for their preferred language. |
| 33 | + |
| 34 | +```yaml docs.yml |
| 35 | +navbar-links: |
| 36 | + - type: dropdown |
| 37 | + text: LLMs |
| 38 | + icon: fa-solid fa-robot |
| 39 | + links: |
| 40 | + - text: Full docs |
| 41 | + href: /llms-full.txt |
| 42 | + - text: Python SDK |
| 43 | + href: /api-reference/llms-full.txt?lang=python&excludeSpec=true |
| 44 | + - text: TypeScript SDK |
| 45 | + href: /api-reference/llms-full.txt?lang=typescript&excludeSpec=true |
| 46 | + - text: Go SDK |
| 47 | + href: /api-reference/llms-full.txt?lang=go&excludeSpec=true |
| 48 | +``` |
| 49 | +</Accordion> |
| 50 | +</AccordionGroup> |
0 commit comments