mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
45 lines
1.3 KiB
Plaintext
45 lines
1.3 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"
|
|
}
|
|
}
|
|
```
|
|
|
|
</CodeGroup>
|
|
|
|
## Custom CDN URL
|
|
|
|
Use `cdnUrl` to load Segment through your own subdomain instead of the default `https://cdn.segment.com`. This is the standard workaround for ad blockers that block Segment's default CDN and requires configuring [Segment's custom domain feature](https://segment.com/docs/connections/sources/custom-domain/).
|
|
|
|
`cdnUrl` must be a valid HTTPS URL and cannot contain query parameters or fragments. When omitted, Segment loads from `https://cdn.segment.com`.
|
|
|
|
```json Example with custom CDN
|
|
"integrations": {
|
|
"segment": {
|
|
"key": "nqJxiRG15Y6M594P8Sb8ESEciU3VC2",
|
|
"cdnUrl": "https://analytics.example.com"
|
|
}
|
|
}
|
|
```
|