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.
- You need your Segment Write Key. In Document360, this is referred to as the Segment ID. See How to find your Segment Write Key below.
How to find your Segment Write Key
To integrate Segment with Document360, you need to create a source in Segment and copy its Write Key.
- Log in to your Segment account.
- Navigate to Connections > Sources, then click Add source.
- Choose Javascript as the source type. You can search for it using the search bar at the top right.
- On the Javascript source page, click Add Source.
- On the Source setup page, enter a Name for your source. You can optionally add a Label (such as
devorprod) and a Website URL. These fields are optional and used for identification only.
-
After creating the source, find your Write Key in either of these 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.
- Settings tab: Under API keys, copy the Write Key listed there.
- Overview tab: In the integration code block, look for the line
-
Use this Write Key in Document360 when configuring the Segment integration (in the Segment ID field).
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.
How to integrate Segment with Document360
-
In the Document360 portal, navigate to Connections () > Integrations () in the left navigation bar.
-
Select Segment from the list of integrations and click Add.
-
In the Add new integration panel, choose a configuration type:
Basic configuration: use this to quickly connect Segment with your knowledge base.
- Description (optional): add a label to identify the integration.
- Segment ID: paste your Segment Write Key here.
Custom configuration: use this to add custom JavaScript code for advanced tracking.
- 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()oranalytics.page().
-
Optionally, expand Code inclusion/exclusion conditions to control where the Segment integration applies based on IP address, workspace, or language.
-
Click Add to complete the integration.
Verify the integration
Once you have completed the integration, follow these steps to confirm that Segment is receiving data from your Document360 knowledge base.
- Open your Document360 knowledge base site in a new tab. This triggers a
pageevent that Segment should capture. - In a separate tab, go to your Segment workspace.
- Navigate to Connections > Sources and select the source you created for Document360.
- Go to the Debugger tab.
- You should see a
pageevent appear in the debugger. If you configured custom events such as button clicks, perform those actions now and verify that the corresponding events appear.
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 for full details.