--- 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: ["Integrations", "Segment"] updated: 2026-07-20T07:46:29Z published: 2026-07-20T07:46:29Z canonical: "docs.document360.com/segment-integration" --- > ## 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, transform, send, and store their first-party customer data more effectively. Segment simplifies data management and makes it easier to connect customer data with other tools in your stack, so you spend less time on setup and more time analyzing meaningful data. Integrating Segment with Document360 lets you send knowledge base visitor data to Segment and route it to any analytics or marketing destination in your stack. --- ## Before you begin - You need a [Segment account](https://segment.com/). - You need your **Segment Write Key**. In Document360, this is referred to as the **Segment ID**. See [How to find your Segment Write Key](/docs/segment-integration#how-to-find-your-segment-write-key) below. --- ## Access your Segment Write Key To integrate Segment with Document360, you need to create a source in Segment and copy its 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 search for it using 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 add a **Label** (such as `dev` or `prod`) and a **Website URL**. These fields are optional and used for identification only. ![Segment source setup page showing fields for name, label, 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, find your **Write Key** in either of these locations: ![Segment source Overview tab showing the analytics.load code snippet with Write Key highlighted](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/2_Screenshot-Segment_write_key_in_overview.jpg) ![Segment source Settings tab showing API Keys section with Write Key](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/3_Screenshot-Segment_write_key_in_api_keys.jpg) - **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. - **Settings tab:** Under **API keys**, copy the Write Key listed there. 2. Use this Write Key in Document360 when configuring the Segment integration (in the **Segment ID** field). 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. --- ## Integrate Segment with Document360 1. In the Document360 portal, navigate to **Connections** () > **Integrations** () in the left navigation bar. 2. Select **Segment** from the list of integrations and click **Add**. 3. In the **Add new integration** panel, choose a configuration type: **Basic configuration:** use this to quickly connect Segment with your knowledge base. **Custom configuration:** use this to add custom JavaScript code for advanced tracking. - **Description** (optional): add a label to identify the integration. - **Segment ID:** paste your Segment Write Key here. - **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()`. 4. Optionally, expand **Code inclusion/exclusion conditions** to control where the Segment integration applies based on IP address, workspace, or language. 5. Click **Add** to complete the integration. ![Segment integration setup in Document360 showing Basic and Custom configuration options](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/Segment%20integration.gif.gif) --- ## Verify the integration Once you have completed the integration, follow these steps to confirm 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 that Segment should capture. 2. In a separate tab, go to your [Segment workspace](https://app.segment.com). 3. Navigate to **Connections** > **Sources** and select the source you created for Document360. 4. Go to the **Debugger** tab. 5. You should see a `page` event appear in the debugger. If you configured custom events such as button clicks, perform those actions now and verify that the corresponding events appear. ![Segment Debugger tab showing incoming page events from a Document360 knowledge base source](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/4_Screenshot-Segment_debugger.jpg) If no events appear in the Debugger, check the following: - **Write Key is incorrect:** double-check that you pasted the correct value in the Segment ID field. - **JavaScript error on the page:** open the browser console and check for errors that may be blocking script execution. - **Browser extension blocking tracking scripts:** try disabling privacy extensions such as uBlock Origin or Ghostery and reload the page. - **Code inclusion/exclusion conditions preventing the script from running:** review any IP address, workspace, or language filters applied in the integration settings. --- ## Best practices - **Use Basic configuration for standard page view tracking.** Entering your Write Key under Basic configuration is the fastest way to start sending data to Segment. Use Custom configuration only when you need to add specific event tracking beyond page views. - **Name your Segment source clearly.** Use a descriptive name like "Document360 Production" so it is easy to identify in your Segment workspace when multiple sources are connected. - **Use the Segment Debugger to verify events after any changes.** Whenever you update the integration settings or add new custom events, check the Debugger tab to confirm events are flowing through correctly. - **Route Segment data to your analytics and marketing destinations.** Once Segment is receiving data from Document360, connect it to downstream tools such as Amplitude, Mixpanel, or your CRM to analyze knowledge base performance alongside your other product data. - **Use Code inclusion/exclusion conditions to exclude internal traffic.** Add your office IP address as an exclusion to keep team visits from skewing your analytics data. --- ## FAQ **What is the difference between the Segment Write Key and the Segment ID in Document360?** They refer to the same value. In Segment, it is called a "Write Key". In Document360, the same value is entered in the "Segment ID" field. Both are used to initialize the Segment integration and connect your knowledge base data to your Segment source. **What is the difference between Basic and Custom configuration?** Basic configuration connects Segment using your Write Key and automatically starts tracking page views. Custom configuration lets you paste a full Segment snippet and add custom event tracking code using `analytics.track()` or `analytics.page()`, which is useful when you need to track specific user interactions beyond page views. **Why are no events appearing in the Segment Debugger?** The most common reasons are: an incorrect Write Key in the Segment ID field, a JavaScript error on the page blocking execution, a browser privacy extension (such as uBlock Origin or Ghostery) blocking the script, or Code inclusion/exclusion conditions filtering out the page you are testing on. See the Verify the integration section for step-by-step checks. **Can I use Segment to send Document360 data to other tools?** Yes. Once Segment is receiving data from Document360, you can connect it to any analytics, marketing, or data warehouse destination in your Segment workspace, such as Amplitude, Mixpanel, Google Analytics, or your CRM. **Can I limit which workspaces or languages the Segment integration runs on?** Yes. When adding or editing the Segment integration, expand **Code inclusion/exclusion conditions** and add conditions based on IP address, Workspace, or Language. See [Code inclusion and exclusion conditions](https://docs.document360.com/docs/advanced-insertion-rules-in-integration) for full details.