mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
3ccba78d8d
* updated api key usage * fixed comma
39 lines
888 B
Plaintext
39 lines
888 B
Plaintext
---
|
|
title: "PostHog"
|
|
---
|
|
|
|
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. We send events to `https://app.posthog.com` by default.
|
|
|
|
<CodeGroup>
|
|
|
|
```json Analytics options in docs.json
|
|
"integrations": {
|
|
"posthog": {
|
|
"apiKey": "YOUR_POSTHOG_PROJECT_API_KEY",
|
|
"apiHost": "optional"
|
|
}
|
|
}
|
|
```
|
|
|
|
```json Example
|
|
"integrations": {
|
|
"posthog": {
|
|
"apiKey": "phc_TXdpocbYTeZVm5VJmMzHTMrCofBQu3e0kN7HGMNGTVW"
|
|
}
|
|
}
|
|
```
|
|
|
|
</CodeGroup>
|
|
|
|
<br />
|
|
|
|
<Warning>
|
|
Enabling PostHog analytics will disable the analytics on the Mintlify dashboard.
|
|
</Warning>
|
|
|
|
## Session Recordings
|
|
|
|
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.
|