Documentation Index
Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This topic explains how to configure your existing Twilio Segment account to send events to LaunchDarkly metrics. Sending Twilio Segment events to LaunchDarkly lets you use Twilio Segment events as LaunchDarkly metric events.Twilio Segment can only send events to custom conversion binary, custom conversion count, and custom numeric metrics. You cannot use Segment events with clicked or tapped or page viewed metrics.

Set up the Twilio Segment integration
To set up the integration, you must have access to your Twilio Segment and LaunchDarkly accounts. You will need them both to connect them to each other.Copy your Launch
Darkly client-side IDCopy your LaunchDarkly client-side ID by following the instructions at View or copy keys and credentials. You will use this client-side ID in the next section.Connect Twilio Segment to Launch
DarklyTo connect Twilio Segment to LaunchDarkly:- Navigate to the Twilio Segment app’s Destinations page.
- Click Add Destination.
- Find LaunchDarkly (Actions) in the Destination Catalog.

- Click Configure LaunchDarkly (Actions).
- Choose which Segment Source should send data to the LaunchDarkly destination.
- Click Next.
- Fill in the Destination name field with the name of your choice.
- Click Save.
- Paste the client-side ID from the previous procedure into the LaunchDarkly client-side ID field.
- Click Save Changes.
- Click the Enable Destination radio button.
- Click Save Changes.

- Navigate to the Mappings tab.
- Click New Mapping.
- Click Track Event.
- The Edit: Track Event page guides you through the process of mapping Segment Track events to LaunchDarkly metric events. The default settings should be acceptable for most customers.
- Click Save.
- On the Mappings tab, click the radio buttons associated with the Track Event mapping to begin sending events to LaunchDarkly. To learn more about track events, read Twilio Segment’s documentation. After you map Twilio Segment events to LaunchDarkly metric events, events from the source you choose appear as custom metric events in LaunchDarkly.
Correlate Twilio Segment users with Launch
Darkly contextsLaunchDarkly correlates Twilio Segment metric events with LaunchDarkly context keys using the Twilio Segment user ID, if it is present. The Twilio Segment user ID must match a LaunchDarkly context key. If the Twilio Segment event does not contain a Twilio Segment user ID, then LaunchDarkly uses the Twilio Segment anonymous ID.If you are using Twilio Segment events in a LaunchDarkly experiment:- the LaunchDarkly metric must be attached to a flag and the experiment must be recording, and
- the context must be included in the experiment for the event to be included in the experiment results.