How analytics 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. Mintlify then sends these events 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
Adobe Analytics
Amplitude
Clearbit
Fathom
Google Analytics 4
Google Tag Manager
Heap
Hightouch
Hotjar
LogRocket
Microsoft Clarity
Mixpanel
Pirsch
Plausible
PostHog
Segment
Setup
Add your analytics provider credentials to theintegrations 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. Your private API keys, which pair with the public keys on the analytics providers’ end, must remain private. Do not include private API keys in your
docs.json.docs.json
Example configuration
docs.json
Verify your setup
After you deploy your updateddocs.json, load a page on your live site and confirm events are flowing in your provider’s real-time or debug view. If events do not appear, check that:
- You are using the public key or ID from the provider, not a private or server key.
- The property name in
docs.jsonmatches the one documented for your provider. - The value is not wrapped in extra quotes or whitespace.
Tracked events
All tracked events use thedocs. prefix.