Integrate Convert Experiences with mParticle

THIS ARTICLE WILL HELP YOU:


Convert-mParticle Integration

Integration of mParticle with Convert Experiences makes it simple for marketers and product managers to leverage user behavior data from web applications and sites to create personalized digital experiences based on data insights.

For each experiment, the integration can pass along the experiment name/id and variation name/id that the visitor is currently bucketed into.

Add Tracking Code Snippets

First make sure the Convert tracking code is installed on your page.

On every page that you want to install mParticle, paste the javascript SDK as described here.

Send Custom Events

You should then create the custom events you want to send (e.g. Convert Experiment Name and Convert Variation Name that the website visitor is bucketed into) by using the logEvent method. The logEvent method allows you to record any actions your customers perform. Each action is known as an event and corresponds to an event type. You can send a custom event from anywhere in the page where Convert experiences are running.

Example code for sending Experiment Name and Variation Name:

var refObject = window['convert']['data']['experiments']
for (var key in window["convert"]["currentData"]["experiments"]) {
if (!window["convert"]["currentData"]["experiments"].hasOwnProperty(key)) {
continue;
}}

var currentExperiment = window["convert"]["currentData"]["experiments"][key];
var curExperimentName = refObject[key] && refObject[key].n ? refObject[key].n : "unknown experiment name";
curExperimentName = curExperimentName.replace("Test #", "Test ");
var curVariant = currentExperiment['variation_name'] ? currentExperiment['variation_name'] : "unknown variant";
curVariant = curVariant.replace("Var #", "Variation ");

mParticle.logEvent(
'Convert',
mParticle.EventType.Navigation,
{'Experiment ID':'curExperimentName','Variation ID':'curVariant'}
);

View Convert Data in mParticle

Track events can be found in the Event Types tab in Admin Settings. Click view next to an event type to see all of the corresponding events.

Navigate to Activity > Live Stream in the left column. The Live Stream lets you inspect all incoming data from your environments. It’s an easy way to check that you have correctly initialized mParticle integration.