---
title: "Analytics"
description: "Track product and usage events from docs, search, AI, feedback, agent, and MCP routes"
canonical_url: "https://docs.farming-labs.dev/docs/customization/analytics"
markdown_url: "https://docs.farming-labs.dev/docs/customization/analytics.md"
last_updated: "2026-10-17"
agent:
  tokenBudget: 900
---

<!-- @farming-labs/docs:generated
version=1
sourceKind=resolved-page
sourceHash=fnv1a64:1d7dae95f1156a3b
settingsHash=fnv1a64:72be2461542d7a95
outputHash=fnv1a64:8dfc9629f7835ae0
generatedAt=2026-08-20T10:20:45.290Z
-->
# Analytics

## Analytics task

Task: Analytics

Expected result: Track product and usage events from docs, search, AI, feedback, agent, and MCP routes

## Analytics verification



## Analytics agent guidance

Top-level `analytics` records product usage, not step-level agent traces. `analytics: true` writes
events with the `[@farming-labs/docs:analytics]` prefix; `analytics.onEvent` forwards normalized
`DocsAnalyticsEvent` objects to a custom destination.

Leave `analytics.includeInputs` false unless the project has consent and a retention policy; paths,
counts, status, durations, and model IDs remain available without raw queries or questions. Verify
the integration by triggering a page, search, Ask AI, Markdown, or MCP action and checking its exact
event type and `source`. Retrieval, model, or tool spans inside one request belong to
`observability` instead.

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
