Skip to content

Segment Integration

Note

This feature is currently in beta. Please contact us if you are interested in joining the beta!

You can integrate Flagsmith with Segment. Send your Identity flag states into segment for further downstream analysis.

Integration Setup

  1. Get the Segment API key for your Segment project. Add an HTTP API source, and make a note of the Write Key.
  2. Go to your Flagsmith project, and click Integrations. Add the Segment Integration.
  3. Paste the Write Key from step 1 into the API Key field in Flagsmith. Select the Flagsmith Environment that you want to send events from. Then hit Save.
  4. All API calls generated by the Flagsmith SDK to the Get Identity Flags endpoint will send the a full set of flag evaluations for that particular user to the Segment Identify endpoint

Use Case

Once the integration has been set up, you can start segmenting your Segment identities based on the flags that they saw. This means you can run AB tests driven by Flagsmith segments, and have the data show up automatically in Segment.

Integration Notes

You have to identify users on both platforms in the same way. The Flagsmith Identity ID must be the same as the Segment user_id.