Dev guideAPI Reference
Dev guideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Set up mParticle

How to send Optimizely Feature Experimentation experiment information from your Android and iOS apps to mParticle for further analysis.

The mParticle integration uses the Optimizely Feature Experimentation DECISION notification listener and the Activate, Get Enabled Features, Get Feature Variable, and Is Feature Enabled methods.

When any of these methods are called, this triggers the DECISION notification listener to send an event containing user, experiment, and variation data as input to mParticle. Once the integration is complete, you can expect to see the event in your Optimizely Feature Experimentation input feed on the mParticle Live Stream dashboard within 1 minute.

Before setting up Optimizely Feature Experimentation as input data for mParticle, we recommend that you review mParticle’s documentation on the Optimizely integration.

mParticle and Android

If you are getting started, read mParticle Getting Started guide for the Android SDK.

Step 1: Prerequisites

  • Make sure that the required experiment is running in Optimizely.
  • Install the mParticle SDK with the additional Optimizely kit on the Android app.

Step 2: Enable the integration

The example code below sends an DECISION notification listener that contains information about the user, experiment, and variation to mParticle in an event called Experiment Viewed.



You can customize the event name and also specify which event tags are included the event payload.

import com.mparticle.MParticle;
OptimizelyClient optimizelyClient = optimizelyManager.getOptimizely();
// Add a DECISION listener
int notificationId1 = optimizelyClient.addDecisionNotificationHandler(notification -> {
            // Access type on decisionObject to get type of decision
            String decisionType = notification.getType();
            Map<String, ?> eventInfo = notification.getDecisionInfo();

            MPEvent event = new MPEvent.Builder("Experiment Viewed", 	EventType.Transaction)
                    .category("AB Test")


mParticle and Optimizely integration using CocoaPods

You can add the mParticle - Optimizely integration kit to your iOS app using CocoaPods. For more information, see the mParticle - Optimizely article on the CocoaPods website.

Test and troubleshoot

To verify the integration is working, check the Optimizely input feed of the mParticle Live Stream dashboard. You should see the sent event (Experiment Viewed, or your customized name) within 3-5 minutes after completing the integration. If you do not see the event, make sure your experiment is running correctly in Optimizely Feature Experimentation.



mParticle uses dollars and Optimizely Feature Experimentation uses cents. mParticle handles the conversion to dollars.

Unsupported platforms

Optimizely Feature Experimentation does not have a suggested solution for integrating mParticle with the following:

  • Agent
  • C# SDK
  • Flutter SDK
  • Go SDK
  • Java SDK
  • JavaScript (Browser) SDK
  • JavaScript (Node) SDK
  • Python SDK
  • React SDK
  • React Native SDK
  • Ruby SDK