---
title: "Segment"
slug: "segment"
description: "Integrate Userflow with Segment to connect data sources and destinations, ensuring seamless event tracking and user attribute management across environments."
updated: 2025-12-29T18:55:06Z
published: 2025-12-29T18:55:06Z
---

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

# Segment

Segment is a data platform that lets you connect data sources with data destinations.

With the Userflow-Segment integration, Userflow can work both as a Segment source and a Segment destination. This way you can get events from Userflow forwarded to other data destinations, and get user attributes and events from other event sources forwarded to Userflow.

### Quick note about the Segment integration

Since Segment has restricted new Web Plugin integrations since late 2019, the Userflow-Segment integration has been improvised. It requires you to independently install Userflow.js in your front-end and utilize standard HTTP API sources along with Webhooks destinations. We apologize for any inconvenience this may cause. If you share our concerns regarding this matter, we encourage you to contact Segment and advocate for the inclusion of support for Userflow.

### Segment sources/destinations and Userflow environments

It’s recommended to use a separate Segment source/destination for each of your environments (Production, Staging). The same is true in Userflow. This is to ensure that, for example, Staging data doesn’t contaminate Production data.

A Userflow-Segment integration is between a single Userflow environment and a single Segment source/destination. If you have both a Staging and a Production environment, you therefore have to run the setup guides below for both Production and Staging.

**We strongly recommend** that you start with your Staging environment and verify that it works as you expect before connecting your Production environment.

We also recommend using a dedicated HTTP API source for Userflow, and to not use the same Segment Write Key for other purposes.

### Required User ID match for integration

To match data between users in Segment and Userflow it is a requirement that you use the same user id to identify users in both platforms.

### Setup guide

The setup consists of 3 parts:

1. [Set up the Segment integration in Userflow](/userflow/docs/segment#set-up-the-segment-integration-in-userflow)
2. [Add Userflow as a source in Segment](/userflow/docs/segment#add-userflow-as-a-source-in-segment)
3. [Add Userflow as a destination in Segment](/userflow/docs/segment#add-userflow-as-a-destination-in-segment)

First, you’ll need to add the Segment integration in Userflow.

### Set up the Segment integration in Userflow

1. [Sign into Userflow](https://userflow.com/app) and navigate to the environment you want to integrate with Segment:

![Go to environment](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-go-to-env(2).png)

1. Go to **Settings** -> **Integrations**. Then click **Add integration**:

![Add integration](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-add-integration(2).png)

1. Find and click **Segment** in the list:

![Find Segment](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-find-segment.png)

1. Click **Add Segment** (activate/upgrade your plan if you don’t yet have access):

![Add Segment](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-add-segment.png)

Next, let’s add Userflow as a source in Segment.

## Add Userflow as a source in Segment

To make Userflow continuously stream [Userflow-generated events](/userflow/docs/userflow-generated-events), such as **Flow Started** and **Checklist Task Completed**, into Segment, we’ll set up Userflow as a source in Segment.

Make sure you’ve set up the [Segment integration in Userflow first](/userflow/docs/segment#set-up-the-segment-integration-in-userflow).

### Setup guide

1. [Sign in to Segment](https://app.segment.com/login/) and click **Add Source**:

![Go to sources](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-source-go-to-sources.png)

1. Search for and click **HTTP API**:

![Select HTTP API](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-source-select-http-api.png)

1. Click **Add Source**:

![Click Add Source](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-source-add-source.png)

1. Give the source a name, such as “Userflow”, and click **Add Source**:

![Give it a name](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-source-setup.png)

1. Copy the **Write Key**:

![Copy key](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-source-copy-key.png)

1. [Sign in to Userflow](https://userflow.com/app) and navigate to **Settings** -> **Integrations** -> **Segment**. Paste the **Write Key** that you copied from Segment in step 3 into the **Segment Write Key** field and click **Save**:

![Paste key](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-paste-key.png)

1. Click the **Stream events from Userflow to Segment** switch and confirm in the dialog that appears:

![Enable event streaming](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-enable-streaming(2).png)

1. Event streaming will start immediately:

![Done](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-done(2).png)

1. Go back to Segment, click the **Debugger** tab, and verify that Userflow events start showing up. It usually only takes a few seconds for Segment to show them:

![Debugger](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-source-debugger.png)

Finally, let’s [add Userflow as a destination in Segment](/userflow/docs/segment#add-userflow-as-a-source-in-segment).

### Stopping the integration

1. Find your **Segment** integration in Userflow under **Settings** -> **Integrations**.
2. If the **Stream events from Userflow to Segment** switch is gray, then it’s already stopped. If it’s green, then it’s currently running.
3. Click the **Stream events from Userflow to Segment** switch and confirm in the dialog that appears.
4. Event streaming will stop immediately.

## Add Userflow as a destination in Segment

To make Segment forward user attributes and events from other data sources into Userflow, we’ll set up Userflow as a destination in Segment.

Make sure you’ve [set up the Segment integration in Userflow](/userflow/docs/segment#set-up-the-segment-integration-in-userflow) first.

### Quick note about the Segment integration

Because Segment has been blocking new Web Plugin integrations since late 2019, the Userflow-Segment integration is a bit ad-hoc. It requires you to install Userflow.js separately in your front-end, and use plain HTTP API sources and Webhooks destinations. For that, we’re sorry. If you’re as frustrated about this as we are, please [go bother Segment about it](https://segment.com/help/contact/) and tell them to open up for Userflow :)

### Setup guide

1. [Sign in to Userflow](https://userflow.com/app) and navigate to **Settings** > **Integrations** > **Segment**. Copy the **Webhook URL**:

![Copy webhook url](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-copy-webhook-url.png)

1. [Sign in to Segment](https://app.segment.com/login/) and click **Add Destination**:

![Go to destinations](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-destination-go-to-destinations.png)

1. Search for and click **Webhooks**:

![Find Webhooks](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-destination-find-webhooks.png)

1. Click **Configure Webhooks**:

![Click Configure Webhooks](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-destination-configure-webhooks.png)

1. Select any sources you want to stream to Userflow. You’ll typically want to have a separate source for your back-end, which you can select here:

![Select source](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-destination-select-source.png)

1. Click **Confirm Source**:

![Click Confirm Source](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-destination-confirm-source.png)

1. Click **Webhooks**:

![Click Webhooks](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-destination-go-to-webhooks.png)

1. Paste the **Webhook URL** that you copied from Userflow into the **Webhook URL** field and click **Save**:

![Add integration](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-destination-paste-url.png)

1. Click the toggle switch to enable the destination:

![Add integration](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/segment-destination-enable.png)

1. Go back to Userflow, go to the **Users** tab, and verify that users/events from Segment start showing up.

### Adding support for company events

*This is only relevant if you have Userflow’s Companies feature enabled.*

Segment does not directly associate events with companies. A common workaround is to use an event property to indicate the related company (examples: `company_id`, `workspace_id` etc.). Userflow can extract this event property and associate events with the right company in Userflow.

1. [Sign in to Userflow](https://userflow.com/app) and navigate to **Settings** > **Integrations** > **Segment**. Enter the name of your company event property and click Save:

![Company event attribute name](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-group-event-attribute-name.png)

A persistent list of tasks or items that users can follow to ensure completion of techniques, often used for onboarding, setup, or feature adoption.
