Skip to content

Commit 2b9ec57

Browse files
Improve analytics overview page clarity (#2421)
* Update integrations/analytics/overview.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> * Update integrations/analytics/overview.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> * Update integrations/analytics/overview.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> * Update integrations/analytics/overview.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> * Update integrations/analytics/overview.mdx Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> * copy edit --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
1 parent f544840 commit 2b9ec57

File tree

1 file changed

+87
-34
lines changed

1 file changed

+87
-34
lines changed

integrations/analytics/overview.mdx

Lines changed: 87 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ description: "Connect to analytics platforms to track user engagement and docume
44
keywords: ["third-party analytics", "engagement tracking", "analytics platforms", "usage tracking"]
55
---
66

7-
Automatically send data about your documentation engagement to your third party analytics provider.
7+
Track how users interact with your documentation by connecting to third-party analytics platforms. Mintlify sends engagement events to your configured analytics providers.
88

9-
## All integrations
9+
## How analytic integrations work
10+
11+
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.
12+
13+
## Supported platforms
1014

1115
<CardGroup cols={2}>
1216
<Card
@@ -543,13 +547,11 @@ fill="#7166F6"
543547
/>
544548
</CardGroup>
545549

546-
## Enabling analytics
547-
548-
Set your analytics keys in `docs.json`. You can add an unlimited number of analytics integrations for free.
550+
## Setup
549551

550-
The syntax for `docs.json` is below. You only need to include entries for the platforms you want to connect.
552+
Add your analytics provider credentials to the `integrations` object in `docs.json`. Only include the platforms you want to use.
551553

552-
```json Analytics options in docs.json
554+
```json docs.json
553555
"integrations": {
554556
"amplitude": {
555557
"apiKey": "required"
@@ -606,34 +608,85 @@ The syntax for `docs.json` is below. You only need to include entries for the pl
606608
}
607609
```
608610

609-
## Analytics events
611+
### Example configuration
612+
613+
```json docs.json
614+
{
615+
"integrations": {
616+
"ga4": {
617+
"measurementId": "G-XXXXXXXXXX"
618+
},
619+
"posthog": {
620+
"apiKey": "phc_xxxxxxxxxxxxx",
621+
"apiHost": "https://app.posthog.com"
622+
},
623+
"mixpanel": {
624+
"projectToken": "xxxxxxxxxxxxx"
625+
}
626+
}
627+
}
628+
```
629+
630+
## Tracked events
631+
632+
All tracked events use the `docs.` prefix.
633+
634+
### Navigation and page views
635+
636+
| Event name | Description |
637+
| :-------------------------------------- | :-------------------------------------------------------------------------------------------------------- |
638+
| `docs.content.view` | User views a page. Only sent to providers that don't track page views by default. |
639+
| `docs.navitem.click` | User clicks a header navigation item. |
640+
| `docs.navitem.cta_click` | User clicks a call to action button. |
641+
| `docs.footer.powered_by_mintlify_click` | User clicks the "Powered by Mintlify" link. |
642+
643+
### Search
644+
645+
| Event name | Description |
646+
| :-------------------------------------- | :-------------------------------------------------------------------------------------------------------- |
647+
| `docs.search.close` | User closes the search bar. |
648+
| `docs.search.result_click` | User clicks a search result. |
649+
650+
### Code and API playground
651+
652+
| Event name | Description |
653+
| :-------------------------------------- | :-------------------------------------------------------------------------------------------------------- |
654+
| `docs.code_block.copy` | User copies code from a code block. |
655+
| `docs.code_block.ask_ai` | User asks the assistant to explain a code block. |
656+
| `docs.api_playground.request` | User makes an API request in the API playground. |
657+
658+
### Interactive components
659+
660+
| Event name | Description |
661+
| :-------------------------------------- | :-------------------------------------------------------------------------------------------------------- |
662+
| `docs.accordion.open` | User opens an accordion. |
663+
| `docs.accordion.close` | User closes an accordion. |
664+
| `docs.expandable.open` | User opens an expandable. |
665+
| `docs.expandable.close` | User closes an expandable. |
666+
667+
### Feedback
668+
669+
| Event name | Description |
670+
| :-------------------------------------- | :-------------------------------------------------------------------------------------------------------- |
671+
| `docs.feedback.thumbs_up` | User clicks the positive feedback button. |
672+
| `docs.feedback.thumbs_down` | User clicks the negative feedback button. |
673+
674+
### AI assistant
675+
676+
| Event name | Description |
677+
| :-------------------------------------- | :-------------------------------------------------------------------------------------------------------- |
678+
| `docs.assistant.enter` | User opens the AI assistant. |
679+
| `docs.assistant.completed` | Chat session completes. |
680+
| `docs.assistant.source_click` | User clicks a citation in a chat response. |
681+
| `docs.assistant.suggestion_click` | User clicks a suggested question. |
682+
| `docs.assistant.ask_ai_on_text_selection` | User selects text and clicks "Ask AI." |
683+
| `docs.assistant.shared` | User shares a chat conversation. |
610684

611-
We send the following events to your analytics provider. All events use the `docs.` prefix.
685+
### Context menu
612686

613687
| Event name | Description |
614688
| :-------------------------------------- | :-------------------------------------------------------------------------------------------------------- |
615-
| `docs.accordion.close` | When a user closes an accordion. |
616-
| `docs.accordion.open` | When a user opens an accordion. |
617-
| `docs.api_playground.request` | When a user calls an API in the API playground. |
618-
| `docs.code_block.copy` | When a user copies code from a code block. |
619-
| `docs.code_block.ask_ai` | When a user asks the assistant to explain a code block. |
620-
| `docs.content.view` | When a user views a page. Only available for analytics providers that do not track page views by default. |
621-
| `docs.feedback.thumbs_up` | When a user clicks the positive feedback button. |
622-
| `docs.feedback.thumbs_down` | When a user clicks the negative feedback button. |
623-
| `docs.navitem.cta_click` | When a user clicks a call to action. |
624-
| `docs.expandable.close` | When a user closes an expandable. |
625-
| `docs.expandable.open` | When a user opens an expandable. |
626-
| `docs.navitem.click` | When a user clicks a header navigation item. |
627-
| `docs.footer.powered_by_mintlify_click` | When a user clicks the "Powered by Mintlify" link. |
628-
| `docs.assistant.source_click` | When a user clicks a citation in a chat. |
629-
| `docs.assistant.suggestion_click` | When a user clicks a suggestion in a chat. |
630-
| `docs.assistant.completed` | When a chat session is completed. |
631-
| `docs.assistant.enter` | When a user initiates a chat. |
632-
| `docs.assistant.ask_ai_on_text_selection` | When a user selects text and clicks "Ask AI" to ask about the selection. |
633-
| `docs.assistant.shared` | When a user shares a chat conversation. |
634-
| `docs.search.close` | When a user closes the search bar. |
635-
| `docs.search.result_click` | When a user clicks a search result. |
636-
| `docs.context_menu.copy_page` | When a user copies the current page as markdown. |
637-
| `docs.context_menu.copy_mcp_link` | When a user copies the hosted MCP server link. |
638-
| `docs.context_menu.ai_provider_click` | When a user clicks an AI provider and create a conversation with current page as context. |
639-
| `docs.context_menu.install_mcp_server` | When a user installs the hosted MCP server on code editors. |
689+
| `docs.context_menu.copy_page` | User copies the current page as markdown. |
690+
| `docs.context_menu.copy_mcp_link` | User copies the hosted MCP server link. |
691+
| `docs.context_menu.ai_provider_click` | User clicks an AI provider to create a conversation with the current page as context. |
692+
| `docs.context_menu.install_mcp_server` | User installs the hosted MCP server on code editors. |

0 commit comments

Comments
 (0)