How it works
When you add analytics integrations to your documentation site, Mintlify tracks user interactions like page views, search queries, API playground requests, and feedback submissions. You can connect multiple analytics providers by adding your API keys to thedocs.json file.
Supported platforms
Mintlify integrates with the following analytics platforms:Google Analytics 4
Track visitor behavior with GA4 measurement ID
Mixpanel
Product analytics and user behavior tracking
PostHog
Product analytics with session recordings
Amplitude
User behavior and product analytics
Clarity
Microsoft Clarity session recordings and heatmaps
Segment
Customer data platform integration
Plausible
Privacy-focused analytics
Fathom
Privacy-first website analytics
Heap
Automatic event tracking
Hotjar
Heatmaps and user feedback
LogRocket
Session replay and error tracking
Hightouch
Reverse ETL and data activation
Configuration
Add your analytics provider credentials to theintegrations object in docs.json. Only include the platforms you want to use.
Google Analytics 4
Track visitor behavior with Google Analytics 4.docs.json
- Create a GA4 property in Google Analytics
- Create a web stream with your docs URL
- Copy the Measurement ID (format:
G-XXXXXXX) - Add it to your
docs.json
Google Analytics takes 2-3 days to show data. Preview links have analytics disabled.
Mixpanel
Track product analytics and user behavior.docs.json
PostHog
Product analytics with session recordings and feature flags.docs.json
Your PostHog project API key (starts with
phc_)PostHog instance URL. Only required for self-hosted. Defaults to
https://app.posthog.comEnable or disable session recordings
Amplitude
User behavior and documentation analytics.docs.json
Clarity
Microsoft Clarity session recordings and heatmaps.docs.json
- Create a Clarity account
- Click Get tracking code
- Copy your project ID
Segment
Customer data platform for routing events to multiple destinations.docs.json
Plausible
Privacy-focused analytics platform.docs.json
Fathom
Privacy-first website analytics.docs.json
Heap
Automatic event tracking for user interactions.docs.json
Hotjar
Heatmaps, session recordings, and user feedback.docs.json
LogRocket
Session replay and error tracking.docs.json
Hightouch
Reverse ETL and data activation platform.docs.json
Google Tag Manager
Manage multiple tracking tags.docs.json
Other platforms
Mintlify also supports:- Adobe Analytics - Enterprise analytics platform
- Clearbit - B2B data enrichment
- Pirsch - Privacy-friendly analytics
Tracked events
All events use thedocs. prefix.
Page views and navigation
| Event | Description |
|---|---|
docs.content.view | User views a page |
docs.navitem.click | User clicks a navigation item |
docs.navitem.cta_click | User clicks a CTA button |
Search
| Event | Description |
|---|---|
docs.search.query | User performs a search |
docs.search.result_click | User clicks a search result |
Code and API playground
| Event | Description |
|---|---|
docs.code_block.copy | User copies code |
docs.api_playground.request | User makes an API request |
AI Assistant
| Event | Description |
|---|---|
docs.assistant.enter | User opens AI assistant |
docs.assistant.completed | Chat session completes |
docs.assistant.thumbs_up | Positive feedback |
docs.assistant.thumbs_down | Negative feedback |
Interactive components
| Event | Description |
|---|---|
docs.accordion.open | User opens accordion |
docs.expandable.open | User opens expandable |
Example configuration
Connect multiple analytics providers:docs.json
Troubleshooting
Events not appearing in analytics platform
Events not appearing in analytics platform
- Verify your API key is correct
- Check that no content security policies are blocking the analytics script
- Ensure you’re not viewing a preview link (analytics are disabled on previews)
- Some platforms take 24-48 hours to show data
Session recordings not working
Session recordings not working
- Add your docs URL to the platform’s authorized domains list
- For PostHog, check that
sessionRecordingis not set tofalse - Verify your browser allows third-party scripts
Multiple analytics platforms conflicting
Multiple analytics platforms conflicting
- Mintlify supports multiple analytics providers simultaneously
- Each platform receives the same events independently
- No special configuration needed for multiple providers