Skip to main content
Track how users interact with your documentation by connecting to third-party analytics platforms. Mintlify sends engagement events to your configured analytics providers.

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 the docs.json file. Analytics events flow to your providers as soon as you add them to your configuration with no further configuration required.

Supported platforms

Setup

Add your analytics provider credentials to the integrations object in docs.json. Only include the platforms you want to use.
docs.json
"integrations": {
    "amplitude": {
        "apiKey": "required"
    },
    "clarity": {
        "projectId": "required"
    },
    "clearbit": {
        "publicApiKey": "required"
    },
    "cookies": {
      "key": "required",
      "value": "required"
    },
    "fathom": {
        "siteId": "required"
    },
    "ga4": {
        "measurementId": "required"
    },
    "gtm": {
        "tagId": "required"
    },
    "hightouch": {
        "apiKey": "required",
        "apiHost": "optional"
    },
    "hotjar": {
        "hjid": "required",
        "hjsv": "required"
    },
    "logrocket": {
        "appId": "required"
    },
    "mixpanel": {
        "projectToken": "required"
    },
    "pirsch": {
        "id": "required"
    },
    "plausible": {
        "domain": "required"
    },
    "posthog": {
        "apiKey": "required",
        "apiHost": "optional"
    },
    "segment": {
      "key": "required"
    },
    "telemetry": {
      "enabled": "boolean"
    }
}

Example configuration

docs.json
{
  "integrations": {
    "ga4": {
      "measurementId": "G-XXXXXXXXXX"
    },
    "posthog": {
      "apiKey": "phc_xxxxxxxxxxxxx",
      "apiHost": "https://app.posthog.com"
    },
    "mixpanel": {
      "projectToken": "xxxxxxxxxxxxx"
    }
  }
}

Tracked events

All tracked events use the docs. prefix.
Event nameDescription
docs.content.viewUser views a page. Only sent to providers that don’t track page views by default.
docs.navitem.clickUser clicks a header navigation item.
docs.navitem.cta_clickUser clicks a call to action button.
docs.footer.powered_by_mintlify_clickUser clicks the “Powered by Mintlify” link.
Event nameDescription
docs.search.closeUser closes the search bar.
docs.search.result_clickUser clicks a search result.

Code and API playground

Event nameDescription
docs.code_block.copyUser copies code from a code block.
docs.code_block.ask_aiUser asks the assistant to explain a code block.
docs.api_playground.requestUser makes an API request in the API playground.

Interactive components

Event nameDescription
docs.accordion.openUser opens an accordion.
docs.accordion.closeUser closes an accordion.
docs.expandable.openUser opens an expandable.
docs.expandable.closeUser closes an expandable.

Assistant and agent

Event nameDescription
docs.assistant.enterUser opens the AI assistant.
docs.assistant.completedChat session completes.
docs.assistant.source_clickUser clicks a citation in a chat response.
docs.assistant.suggestion_clickUser clicks a suggested question.
docs.assistant.ask_ai_on_text_selectionUser selects text and clicks “Ask AI.”
docs.assistant.sharedUser shares a chat conversation.
docs.assistant.thumbs_upUser clicks the positive feedback button on an assistant response.
docs.assistant.thumbs_downUser clicks the negative feedback button on an assistant response.
docs.assistant.spam_detectedThe assistant detects spam in a user message.
docs.autopilot.suggestion.createdThe agent creates a documentation suggestion.
docs.autopilot.suggestion.no_suggestionThe agent determines no documentation update is needed.

Contextual menu

Event nameDescription
docs.context_menu.copy_pageUser copies the current page as markdown.
docs.context_menu.copy_mcp_linkUser copies the hosted MCP server link.
docs.context_menu.ai_provider_clickUser clicks an AI provider to create a conversation with the current page as context.
docs.context_menu.install_mcp_serverUser installs the hosted MCP server on code editors.