LaunchDarkly Events Destination


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

Before you start, make sure LaunchDarkly Events supports the source type and connection mode you’ve chosen to implement. You can learn more about connection modes here.

Web Mobile Server
📱 Device-mode
☁️ Cloud-mode
  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, 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.

Track

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:

{
  "anonymousId": "23adfd82-aa0f-45a7-a756-24f2a7a4c8955",
  "type": "track",
  "properties": {
    "value": 99.84,
  },
  "userId": "test-user-s6dndc",
  "event": "Order Completed"
}

LaunchDarkly ingests that call as:

{
  "kind": "custom",
  "key": "Order Completed",
  "userKey": "userId",
  "creationDate": 1592588370692,
  "metricValue": 99.84,
  "data": {
    "value": 99.84,
  }
}

Note: 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.

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.

Personas

You can send computed traits and audiences generated using Segment Personas to this destination as a user property. To learn more about Personas, contact us for a demo.

For user-property destinations, an identify call is sent to the destination for each user being added and removed. The property name is the snake_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Personas sends an Identify call with the property order_completed_last_30days: true. When the user no longer satisfies this condition (for example, it’s been more than 30 days since their last order), Personas sets that value to false.

When you first create an audience, Personas sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

API Key

Find and copy the client-side ID from your default project in LaunchDarkly Account Settings.

This page was last modified: 28 Aug 2020

Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account