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 automatically.

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 the docs.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 the integrations object in docs.json. Only include the platforms you want to use.
Analytics integrations only require public API keys, which are accessible to anyone viewing your documentation site. Never include private API keys in your docs.json.

Google Analytics 4

Track visitor behavior with Google Analytics 4.
docs.json
Setup steps:
  1. Create a GA4 property in Google Analytics
  2. Create a web stream with your docs URL
  3. Copy the Measurement ID (format: G-XXXXXXX)
  4. 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
Find your project token in Mixpanel project settings.

PostHog

Product analytics with session recordings and feature flags.
docs.json
string
required
Your PostHog project API key (starts with phc_)
string
PostHog instance URL. Only required for self-hosted. Defaults to https://app.posthog.com
boolean
default:"true"
Enable or disable session recordings

Amplitude

User behavior and documentation analytics.
docs.json

Clarity

Microsoft Clarity session recordings and heatmaps.
docs.json
Getting your project ID:
  1. Create a Clarity account
  2. Click Get tracking code
  3. 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
See the analytics overview documentation for the complete list.

Tracked events

All events use the docs. prefix.

Page views and navigation

Code and API playground

AI Assistant

Interactive components

Example configuration

Connect multiple analytics providers:
docs.json

Troubleshooting

  • 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
  • Add your docs URL to the platform’s authorized domains list
  • For PostHog, check that sessionRecording is not set to false
  • Verify your browser allows third-party scripts
  • Mintlify supports multiple analytics providers simultaneously
  • Each platform receives the same events independently
  • No special configuration needed for multiple providers