---
title: "How to integrate segment with Document360?"
slug: "segment-integration"
description: "Segment is a powerful tool for analyzing user data and will be extremely useful for a product and marketing team to understand user behaviour. You can integrate Segment to understand your users better with schematized and actionable data to enhance your knowledge base site experience."
tags: ["Segment", "Integrations"]
updated: 2026-01-31T17:30:02Z
published: 2026-01-31T17:30:02Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.document360.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Segment

**Segment** is a powerful analytics tool that helps product and marketing teams understand user behavior. It enables businesses to collect and act on customer data more effectively.

**Segment** helps you collect, transform, send, and store your first-party customer data. It simplifies data management and makes it easier to connect with other tools in your stack, so you can spend less time setting up and more time analyzing meaningful data.

---

## Integrating **Document360** and **Segment**

1. Navigate to ****Connections**** (**) > **Integrations** in the left navigation bar****in the Knowledge base portal.
2. Select **Segment** from the list of integrations and click **Add**.
3. In the **Add new integration** panel, choose either Basic configuration or Custom configuration, based on your needs.

### Basic configuration

Use this option to quickly connect **Segment** with your knowledge base. To configure, provide the following details:

- **Description**: (Optional) Add a label to identify the integration.
- **Segment** ID: Paste your **Segment** **Write Key** here.

> [!NOTE]
> NOTE
> 
> In **Segment**, this value is called a “Write Key”. In **Document360**, it is referred to as the “Segment ID”. Both refer to the same value used to initialize the Segment integration.

### Custom configuration

Use this option to add custom JavaScript code for advanced tracking. To configure, provide the following details:

- **Description**: (Optional) Add a label to identify the integration.
- Code: Paste the full **Segment** snippet with your Write Key. You can also include custom events using `analytics.track()` or `analytics.page()`.

1. (Optional) Use the **Code inclusion/exclusion conditions** to control where the **Segment** integration is applied (e.g., by IP address, workspace, or language).
2. Click **Add** to complete the integration.

![](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/Segment%20integration.gif.gif)

---

## Getting your Segment Write Key

To integrate **Segment** with **Document360**, you need to create a source and copy the Write Key.

1. Log in to your [Segment account](https://segment.com/).
2. Navigate to **Connections**> **Sources**, then click **Add source**.
3. Choose **Javascript** as the source type. You can find it by searching for “Javascript” in the Search bar at the top right.
4. On the Javascript source page, click **Add Source**→.
5. On the **Source setup** page, enter a **Name**for your source. You can optionally select a **Label** (such as `dev` or `prod`) and provide a **Website URL**. These fields are optional and used for identification only.

![Source setup for Segment integration showing fields for name, labels, and website URL.](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/1_Screenshot-Segment_add_source.jpg)

1. After creating the source, you can find the **Write Key** in either of the following locations:
  - **Overview tab**: In the integration code block, look for the line `analytics.load(“YOUR_WRITE_KEY”)`. The value inside the quotation marks is your Write Key.

![Overview of a Segment source in the Segment interface with code snippet for Segment installation highlighted.](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/2_Screenshot-Segment_write_key_in_overview.jpg)
  - **Settings tab**: Under **API keys**, copy the Write Key listed there.

![Settings page in the Segment interface displaying API Keys and source ID for integrations in Segment.](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/3_Screenshot-Segment_write_key_in_api_keys.jpg)
2. Use this Write Key in **Document360** when configuring the **Segment** integration (in the **Segment** ID field).

## Verifying the integration

Once you have completed the integration, follow these steps to verify that **Segment** is receiving data from your **Document360** knowledge base,

1. Open your **Document360** knowledge base site in a new tab. This triggers a `page` event, which **Segment** should capture.
2. In a separate tab, go to your [Segment workspace](https://app.segment.com).
3. From the left navigation, go to **Connections**> **Sources**, and select the source you created for **Document360**.
4. In the source page, go to the **Debugger** tab.
5. You should see a `page` event appear in the debugger. If you’ve configured custom events (e.g., button clicks), perform those actions now and verify that the corresponding events appear in the debugger.

![Segment interface showing sources with highlighted page links and debugger option.](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/4_Screenshot-Segment_debugger.jpg)

If you don’t see any events, here are some possible reasons:

- The Write Key is incorrect: Double-check that you pasted the correct value in the Segment ID field.
- There’s a JavaScript error on the page: Check the browser console for errors that may be blocking execution.
- You’re using a browser extension that blocks tracking scripts: Try disabling privacy extensions like uBlock Origin or Ghostery.
- Custom inclusion/exclusion conditions are preventing the script from running: Review any IP, workspace, or language filters applied in the integration.
