AnalyticsSegment
Analytics

Segment

Route analytics data from your documentation site through Segment.

Segment collects analytics events and routes them to your downstream tools. Enable the integration to send documentation events through your Segment source.

Prerequisites

  • A Segment account with a JavaScript source created

  • Your Segment source write key

  • Publishing access to your documentation project

Configure from the Editor

Open Site Config

In the Editor, click Site Config in the top toolbar.

Navigate to Integrations

Select Integrations from the left sidebar.

Enable Segment

Select Segment and enter your source write key.

Publish

Click Publish to deploy the integration to your live site.

Configure via documentation.json

Add the segment key under integrations in your documentation.json:

{
  "integrations": {
    "segment": {
      "writeKey": "your_write_key"
    }
  }
}
PropertyTypeRequiredDescription
writeKeystringYesYour Segment source write key

Where to find your write key

  1. Sign in to Segment.

  2. Go to Sources → select your source → SettingsAPI Keys.

  3. Copy the Write Key value.

What's next