mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
7662f8fb2a
* clarify MCP returns MD * Fix doc issues surfaced by user feedback - Fix claude mcp add --header argument order: the flag must come after the positional <name> and <url> args because --header is variadic and otherwise consumes everything that follows it, causing the "missing required argument 'name'" error users reported. - Add tip to wrap iframes in Frame component to prevent overflow (user suggestion on image-embeds page). - Fix broken anchor link in quickstart CLI tab: /cli/install has no #clone-your-repository section; replaced with inline git clone instructions and a correct link to /deploy/github. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Document wide-mode behavior for side panel Wide mode hides the entire side panel (not just the TOC), including Panel components and OpenAPI request/response examples. This was undocumented and actively confused a user who couldn't understand why their OpenAPI example panels disappeared on wide-mode pages. - Fix the wide mode description in organize/pages.mdx (it previously said only the TOC was hidden, but ContentSideLayout.tsx returns null for wide/center/custom modes entirely) - Add a Note to components/panel.mdx calling out that the side panel is absent on wide, center, and custom pages Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Resolve user feedback: clarify path formats, load timing, and analytics config - react-components: add Constraints section (hooks pre-injected, no npm, no default exports) - posthog: fix default host from app.posthog.com to ph.mintlify.com (confirmed via source) - plausible: add ParamField descriptions including server field explanation - create/text: note that internal links require root-relative paths without file extensions - create/image-embeds: clarify image paths are root-relative, relative paths unsupported - create/redirects: show redirects as top-level field in full docs.json example - customize/custom-scripts: note that custom JS runs after page is interactive, applies globally Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * 💅 --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
62 lines
1.9 KiB
Plaintext
62 lines
1.9 KiB
Plaintext
---
|
|
title: "PostHog"
|
|
description: "Integrate PostHog with your Mintlify documentation site to track product analytics, feature usage, and user behavior with your API key."
|
|
keywords: ["PostHog integration", "product analytics", "feature flags", "self-hosted PostHog"]
|
|
boost: 3
|
|
---
|
|
|
|
Add the following to your `docs.json` file to send analytics to PostHog.
|
|
|
|
You only need to include `apiHost` if you are self-hosting PostHog. By default, Mintlify proxies events through `https://ph.mintlify.com` to your PostHog project.
|
|
|
|
<CodeGroup>
|
|
|
|
```json Analytics options in docs.json
|
|
"integrations": {
|
|
"posthog": {
|
|
"apiKey": "YOUR_POSTHOG_PROJECT_API_KEY",
|
|
"apiHost": "optional",
|
|
"sessionRecording": true
|
|
}
|
|
}
|
|
```
|
|
|
|
```json Example
|
|
"integrations": {
|
|
"posthog": {
|
|
"apiKey": "phc_TXdpocbYTeZVm5VJmMzHTMrCofBQu3e0kN7HGMNGTVW"
|
|
}
|
|
}
|
|
```
|
|
|
|
</CodeGroup>
|
|
|
|
### Configuration options
|
|
|
|
<ParamField path="apiKey" type="string" required>
|
|
Your PostHog project API key. Must start with `phc_`.
|
|
</ParamField>
|
|
|
|
<ParamField path="apiHost" type="string">
|
|
The URL of your PostHog instance. Only required if you are self-hosting PostHog. Defaults to `https://ph.mintlify.com` (Mintlify's PostHog proxy).
|
|
</ParamField>
|
|
|
|
<ParamField path="sessionRecording" type="boolean" default="true">
|
|
Enable or disable session recording. Set to `false` to disable session recordings while keeping analytics enabled.
|
|
</ParamField>
|
|
|
|
## Session recordings
|
|
|
|
Configuring PostHog enables session recordings by default. To disable session recordings while keeping analytics enabled, set `sessionRecording` to `false` in your configuration.
|
|
|
|
```json Disable session recordings
|
|
"integrations": {
|
|
"posthog": {
|
|
"apiKey": "phc_your-key",
|
|
"sessionRecording": false
|
|
}
|
|
}
|
|
```
|
|
|
|
You need to add the URL for your docs website to PostHog's "Authorized domains for recordings" before you can receive session recordings. The option to add your URL is in PostHog's project settings.
|