Integrate Convert Experiences with Customer.io

This Article Will Help You:


Convert-Customer.io Integration

Customer.io is a behavioral email platform that harnesses user activity and profile data to send targeted campaigns at scale. This article will walk you through how to push custom data to Customer.io.

For each experiment, the integration will pass along the experiment name and variation name that the visitor is currently bucketed into (if any).

Add Tracking Code Snippets

Make sure the Convert tracking code and the Customer.io javascript code are installed on your page. Customer.io tracking code looks like this:

 

Activate Integration Manually

Now, you should add this extra code to your website and use Customer.io identify function to send customer data. Be sure to modify it with the attributes that you would like to send:


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 ");


_cio.identify({
// Required attributes
id: 'user_287', // Unique id for the currently signed in user in your application.

// Strongly recommended attributes
email: 'user@domain.com', // Email of the currently signed in user.
created_at: 1339438758, // Timestamp in your system that represents when
// the user first signed up. You'll want to send it
// as seconds since the epoch.

// Example attributes (you can name attributes what you wish)
Exp_Name: curExperimentName,
Var_Name: curVariant
});

View Convert Data in Customer.io

You will be able to view all of your Convert Experiences data. Once logged in, go to People and search for the custom table attributes you created: