Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

LaunchDarkly Events Destination


(warning)

Warning

This destination is currently under maintenance. Please check back later or contact support.

LaunchDarkly is a feature management platform that empowers development teams to safely deliver and control software through feature flags.

LaunchDarkly users can run experiments on any feature flag, with custom events as metrics. You can look for an existing custom event from Segment, and start recording data against it as a metric in your LaunchDarkly experiment.

This destination is maintained by LaunchDarkly. For any issues with the destination, contact the LaunchDarkly support team.


Getting Started

getting-started page anchor
  1. From the Destinations catalog page in the Segment App, click Add Destination.
  2. Search for "LaunchDarkly" in the Destinations Catalog, and select the LaunchDarkly destination.
  3. Choose which Source should send data to the LaunchDarkly destination.
  4. Go to the LaunchDarkly Account Settings(link takes you to an external page), and find and copy the client-side ID from your default project.
  5. Enter this ID as the API Key in the "LaunchDarkly" destination settings in Segment.

If you aren't familiar with the Segment Spec, take a look at the Track method documentation to learn about what it does. An example call would look like:

1
{
2
"anonymousId": "23adfd82-aa0f-45a7-a756-24f2a7a4c8955",
3
"type": "track",
4
"properties": {
5
"value": 99.84,
6
},
7
"userId": "test-user-s6dndc",
8
"event": "Order Completed"
9
}

LaunchDarkly ingests that call as:

1
{
2
"kind": "custom",
3
"key": "Order Completed",
4
"userKey": "userId",
5
"creationDate": 1592588370692,
6
"metricValue": 99.84,
7
"data": {
8
"value": 99.84,
9
}
10
}
(warning)

Warning

The LaunchDarkly Metric must be actively recording and have a Feature Flag attached for Segment events to appear in your LaunchDarkly Project.

Segment sends Track calls to LaunchDarkly as a track event. It appears on your Debugger page(link takes you to an external page).

track events map to a Metric if the Segment event name exactly matches the Name of an active LaunchDarkly experiment metric.

The userKey field maps to the userId field; if there is no userId field, LaunchDarkly uses anonymousId field for the userKey field.