---
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: "2018-10-20"
agent:
  tokenBudget: 900
---

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