Files

36 lines
1.1 KiB
Plaintext

---
title: "Segment"
description: "Integrate Segment with your Mintlify documentation to route analytics events to downstream tools like warehouses, CRMs, and marketing platforms."
keywords: ["Segment integration", "write key", "event streaming", "CDP integration"]
boost: 3
---
Add your Segment write key to your `docs.json` file to send analytics to Segment.
<CodeGroup>
```json Analytics options in docs.json
"integrations": {
"segment": {
"key": "required",
"cdnUrl": "optional"
}
}
```
```json Example
"integrations": {
"segment": {
"key": "nqJxiRG15Y6M594P8Sb8ESEciU3VC2",
"cdnUrl": "https://cdn.mydomain.com"
}
}
```
</CodeGroup>
## Custom CDN URL
If you use [Segment's custom domain feature](https://segment.com/docs/connections/sources/custom-domains/), set `cdnUrl` to load the Segment script from your custom domain instead of the default `cdn.segment.com`. Loading from your own domain helps prevent ad blockers from blocking your analytics.
The `cdnUrl` must be an HTTPS URL without query parameters or fragments.