Skip to main content

Integrations

Segment

Wire Segment into every docs page — add your write key to `integrations.segment` and the script loads on next deploy.

Customer data platform — one install, fan events out to 300+ downstream destinations.

Configure

integrations.segmentstringpathrequired

Segment Write key. Script injects via <Script strategy="afterInteractive"> and loads from https://cdn.segment.com.

{
  "integrations": {
    "segment": "abcxyz123"
  }
}

Where to find your write key

Segment workspace → Sources → your JavaScript source → SettingsAPI KeysWrite Key.

Or set it from the dashboard — Editor → Configurations → AI & Advanced → Integrations.

Gotchas

  • Don't also ship a destination that Segment already forwards to (e.g. GA4 via Segment + ga4 here = double counting).

Loading behavior

  • Strategy: afterInteractive — injected after page interactivity, so it never blocks first paint.

  • CSP: if you enforce a Content Security Policy, allowlist https://cdn.segment.com in script-src.

  • Removal: delete the integrations.segment key (or blank it in the dashboard) and redeploy — the script disappears on the next page load.

Related

Was this page helpful?

Last updated August 7, 2026