How analytic integrations work
When you add analytics integrations to your documentation site, Mintlify tracks user interactions like page views, search queries, API playground requests, and feedback submissions and sends them to your analytics providers. You can connect any number of supported analytics providers by adding your API keys to thedocs.json file. Analytics events flow to your providers as soon as you add them to your configuration with no further configuration required.
Supported platforms
Amplitude
Mixpanel
Clarity
PostHog
Google Analytics 4
Google Tag Manager
Hightouch
HotJar
LogRocket
Pirsch
Plausible
Fathom
Clearbit
Heap
Segment
Setup
Add your analytics provider credentials to theintegrations object in docs.json. Only include the platforms you want to use.
docs.json
Example configuration
docs.json
Tracked events
All tracked events use thedocs. prefix.
Navigation and page views
| Event name | Description |
|---|---|
docs.content.view | User views a page. Only sent to providers that don’t track page views by default. |
docs.navitem.click | User clicks a header navigation item. |
docs.navitem.cta_click | User clicks a call to action button. |
docs.footer.powered_by_mintlify_click | User clicks the “Powered by Mintlify” link. |
Search
| Event name | Description |
|---|---|
docs.search.close | User closes the search bar. |
docs.search.result_click | User clicks a search result. |
Code and API playground
| Event name | Description |
|---|---|
docs.code_block.copy | User copies code from a code block. |
docs.code_block.ask_ai | User asks the assistant to explain a code block. |
docs.api_playground.request | User makes an API request in the API playground. |
Interactive components
| Event name | Description |
|---|---|
docs.accordion.open | User opens an accordion. |
docs.accordion.close | User closes an accordion. |
docs.expandable.open | User opens an expandable. |
docs.expandable.close | User closes an expandable. |
Assistant and agent
| Event name | Description |
|---|---|
docs.assistant.enter | User opens the AI assistant. |
docs.assistant.completed | Chat session completes. |
docs.assistant.source_click | User clicks a citation in a chat response. |
docs.assistant.suggestion_click | User clicks a suggested question. |
docs.assistant.ask_ai_on_text_selection | User selects text and clicks “Ask AI.” |
docs.assistant.shared | User shares a chat conversation. |
docs.assistant.thumbs_up | User clicks the positive feedback button on an assistant response. |
docs.assistant.thumbs_down | User clicks the negative feedback button on an assistant response. |
docs.assistant.spam_detected | The assistant detects spam in a user message. |
docs.autopilot.suggestion.created | The agent creates a documentation suggestion. |
docs.autopilot.suggestion.no_suggestion | The agent determines no documentation update is needed. |
Contextual menu
| Event name | Description |
|---|---|
docs.context_menu.copy_page | User copies the current page as markdown. |
docs.context_menu.copy_mcp_link | User copies the hosted MCP server link. |
docs.context_menu.ai_provider_click | User clicks an AI provider to create a conversation with the current page as context. |
docs.context_menu.install_mcp_server | User installs the hosted MCP server on code editors. |