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 Audiences Destination


Destination Info
  • Accepts Page, Alias, Group, Identify and Track calls.
  • Refer to it as LaunchDarkly Audiences in the Integrations object
  • This integration is partner owned. Please reach out to the partner's support for any issues.

LaunchDarkly(link takes you to an external page) is a feature management platform that empowers development teams to safely deliver, control, and measure their software through feature flags.

With LaunchDarkly, you can release features that target specific groups, such as beta users, and premium accounts, using segments. This destination allows you to sync Engage Audiences to LaunchDarkly segments, letting you concentrate more on deploying features and less on managing end users between platforms.

LaunchDarkly maintains this destination. For any issues with the destination, contact the LaunchDarkly Support team.


Getting started

getting-started page anchor
  1. In LaunchDarkly, navigate to Account settings(link takes you to an external page) and copy the client-side ID for the project and environment where you would like to create an Engage Audience synced segment.
  2. In LaunchDarkly, create a service token with either a Writer role or a custom role. If your service token has a custom role, it must have the actions createSegment and updateIncluded to sync a segment from an Engage Audience. To learn how to create a service token, read Creating API access tokens(link takes you to an external page).
  3. From the Segment web app, navigate to Engage > Audiences. Ensure you are in the Engage space you plan to use with the LaunchDarkly Audiences destination. Either choose an existing Engage audience or create a new one. This is the audience you plan to sync with LaunchDarkly.
  4. Navigate to Engage > Engage Settings and click Destinations. Ensure you are still in the correct Engage space.
  5. Search for LaunchDarkly Audiences and select the destination. Click Add destination.
  6. On the Select Source screen, your Engage space should already be selected as the source. Click Confirm Source.
  7. On the Destination Settings tab, name your destination and provide your LaunchDarkly client-side ID and service token.
  8. Toggle Enable Destination on and click Save Changes.
  9. Navigate to the Mappings tab, click New Mapping, and select the Sync Engage Audience to LaunchDarkly pre-built mapping.
  10. Under Select mappings, modify the default mappings as needed. In most cases, you shouldn't need to make any changes.
  11. Click Save.
  12. Ensure the Status toggle on the Mappings tab is enabled.

Property nameTypeRequiredDescription
LaunchDarkly Service Tokenpassword
required

We recommend creating a dedicated LaunchDarkly service token(link takes you to an external page) for this destination. The service token must have the ability to perform the createSegment and updateIncluded role actions(link takes you to an external page).


LaunchDarkly client-side IDstring
required

Copy the client-side ID(link takes you to an external page) of the environment for your segment. You can find this in the LaunchDarkly Account settings page for your project.


LaunchDarkly Audiences has the following presets

Preset NameTriggerDefault Action
Sync Engage Audience to LaunchDarklyEvent type = "identify", Event type = "track"Sync Audience

Build your own Mappings. Combine supported triggers with the following LaunchDarkly Audiences-supported actions:

(information)

Mapping limits per destination

Individual destination instances have support a maximum of 50 mappings.

Sync Audience

sync-audience page anchor

Sync Engage Audiences to LaunchDarkly segments

Sync Audience is a Cloud action. The default Trigger is type = "identify" or type = "track"

Property nameTypeRequiredDescription
Context kindSTRING
required

The event's context kind. To learn more about context kinds and where you can find a list of context kinds LaunchDarkly has observed, read Context kinds(link takes you to an external page).


Context keySTRING
required

The unique LaunchDarkly context key. In most cases the Segment UserId should be used.


Batch eventsBOOLEAN

Optional

When enabled, the action will batch events before sending them to LaunchDarkly. In most cases, batching should be enabled.


You can send computed traits and audiences generated using Engage to this destination as a user property. To learn more about Engage, schedule a demo(link takes you to an external page).

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, Engage 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), Engage sets that value to false.

When you first create an audience, Engage 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.

(information)

Real-time to batch destination sync frequency

Real-time audience syncs to LaunchDarkly Audiences may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.


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

Property nameTypeRequiredDescription
LaunchDarkly Service Tokenpassword
required

We recommend creating a dedicated LaunchDarkly service token(link takes you to an external page) for this destination. The service token must have the ability to perform the createSegment and updateIncluded role actions(link takes you to an external page).


LaunchDarkly client-side IDstring
required

Copy the client-side ID(link takes you to an external page) of the environment for your segment. You can find this in the LaunchDarkly Account settings page for your project.