LaunchDarkly Developer Documentation

Get started in under 30 minutes.
LaunchDarkly provides feature flags as a service for Java · Python · Ruby · Go · Node.js · PHP · .NET. Control feature launches -- who sees what and when -- without multiple code deploys. Easy dashboard for phased rollouts, targeting and segmenting.
Need more help? write us at support@launchdarkly.com

Get Started    Documentation

mParticle

Overview

This topic explains how to create and test an mParticle destination for data export.

mParticle is a customer data platform that allows you to aggregate your analytics and create customer cohorts.

Prerequisites

To set up an mParticle destination in LaunchDarkly, you will need:

  • Your mParticle server to server key
  • Your mParticle server to server secret

The key and secret are available in your mParticle account. Copy and save both strings. You'll need them to connect mParticle to LaunchDarkly.

The mParticle API keys screen.

The mParticle API keys screen.

Creating the mParticle destination in LaunchDarkly

You can use the LaunchDarkly UI to create and modify destinations for data export.

To create an mParticle destination in LaunchDarkly:

  1. Navigate to the Integrations screen.
  2. Click on the mParticle icon or, if this is not your first destination, click the Add Destination drop down.
  3. Choose mParticle from the dropdown. The "Create a destination" screen appears.
The "Add Destination" dropdown with mParticle selected.

The "Add Destination" dropdown with mParticle selected.

  1. (Optional) Enter a Name for the destination.
  2. Select an Environment for this destination to receive events from.

Environment settings are permanent

You cannot change an environment after you create the destination. If you wish to export event data from a different environment, you must set up another destination.

  1. Select an mParticle Environment.
  2. Enter your mParticle Server to Server Key in the API key field.
  3. Enter your mParticle Server to Server Secret in the API secret field.
The Create a destination screen.

The Create a destination screen.

  1. Select a User identifier type from the dropdown. Choose from the following options:
    • customer_id
    • email
    • facebook
    • twitter
    • google
The User identifier dropdown.

The User identifier dropdown.

Choose the correct user identifier for your events

The user identifier you choose must match an identity you chose to identify users in the mParticle ecosystem.

Every event LaunchDarkly exports has a user key specified by the SDK. The user identifier should correspond to the mParticle user identity your SDK user key represents. For example, if your user key represents an email address, you should choose email as the user identifier.

To learn more about exported events, read Schema reference.

  1. Click Save Destination.

The mParticle destination appears in the "Your data export destinations" section of the Integrations screen.

Testing an mParticle destination

After you create an mParticle destination for data export, you can confirm that it's working correctly in the "Create a destination screen."

To test the mParticle destination:

  1. Navigate to the Integrations screen.
  2. Find the mParticle destination and click Edit. The "Edit destination" screen opens.
  3. Set the mParticle environment to development. This allows the test event to appear in the events stream on the mParticle dashboard.
  4. Click Send Event in the "Send a test event" section.
The Send a test event section.

The Send a test event section.

  1. Verify the event appears on the mParticle events live stream.

Example events

These example events display the structure of the events LaunchDarkly sends to mParticle.

LaunchDarkly sends events in the following formats:

{
  "user_identities": {
    "customer_id": "example_user"
  },
  "environment": "production",
  "events": [
    {
      "event_type": "custom_event"
      }
    }
  ]
}
{
  "user_identities": {
    "customer_id": "example_customer"
  },
  "environment": "production",
  "events": [
    {
      "event_type": "custom_event"
      }
    }
  ]
}
{
  "user_identities": {
    "customer_id": "example_customer"
  },
  "environment": "production",
  "events": [
    {
      "event_type": "custom_event"
      }
    }
  ]
}
{
  "user_identities": {
    "customer_id": "example_customer"
  },
  "environment": "production",
  "events": [
    {
      "event_type": "screen_view"
      }
    }
  ]
}

Enabling data export for flags and environments

After you create a data export destination, you must start sending flag or environment event data to it. You can enable data export for individual flags, or for all the flags in an environment.

To learn more about exporting event data from flags and environments, read Data Export.

Deleting an mParticle destination

You can delete a data export destination from the Integrations screen.

To delete a destination:

  1. Navigate to the Integrations screen.
  2. Find the destination you wish to delete and click Edit. The "Create a destination" screen opens.
  3. Click Delete Destination.
The Delete destination section.

The Delete destination section.



mParticle


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.