Skip to content
  • There are no suggestions because the search field is empty.

Integrate Convert Experiences with Pendo

Sync Convert A/B Test Data with Pendo for Deeper Product Analytics

Author:
Dionysia Kontotasiou

THIS ARTICLE WILL HELP YOU:


 Convert-Pendo Integration

Pendo is a product-analytics app built to help software companies develop products that resonate with customers. The app allows software makers to embed in their products a wide range of tools that can lead both to a better product experience for users and new insights for the product team.

This article will walk you through how to send data from Convert experiences/variations to your Pendo account. For each experiment, the integration will pass along the experiment name and variation name that the visitor is currently bucketed into (if any) as a track event.

Add Tracking Code Snippets

Make sure the Convert tracking code and the Pendo code are installed on your page. Pendo tracking code installation instructions can be found here.

Activate Integration Manually

Once you have the two tracking codes in your website, then you should add this extra code to track events  (one for experiment name and one for variation name). You can add this to the Project Global Javascript section or directly on your pages, after the Kissmetrics and Convert tracking codes.


// Get config data - handle both structures (latest + legacy)
var configData = window['convert']['data']['experiments'] || window['convert']['data']['experiences'] || {};
var isArray = Array.isArray(configData);

// Get current experiments/experiences
var currentExperiments = window['convert']['currentData']['experiments'] ||
window['convert']['currentData']['experiences'] || {};

// Helper function to find experience in config
function getExperienceFromConfig(id) {
if (isArray) {
// Latest: Array of objects - need to find by id
return configData.find(function(exp) {
return String(exp.id) === String(id);
}) || null;
} else {
// Legacy: Object keyed by id
return configData[id] || null;
}
}

for (var key in currentExperiments) {
if (!currentExperiments.hasOwnProperty(key)) {
continue;
}

var currentExperiment = currentExperiments[key];
var configExperience = getExperienceFromConfig(key);

// Get experiment name
// Legacy: .n or .test_name | Latest: .name
var curExperimentName = "unknown experiment name";
if (configExperience) {
curExperimentName = configExperience.n || configExperience.name || configExperience.test_name || curExperimentName;
}
curExperimentName = curExperimentName.replace("Test #", "Test ");

// Get variant name
// Legacy: variation_name | Latest: variation.name
var curVariant = "unknown variant";
if (currentExperiment['variation_name']) {
curVariant = currentExperiment['variation_name'];
} else if (currentExperiment.variation && currentExperiment.variation.name) {
curVariant = currentExperiment.variation.name;
}
curVariant = curVariant.replace("Var #", "Variation ");

pendo.track("Convert", {
'Experiment Name': curExperimentName, // Fixed: removed quotes around variable
'Variation Name': curVariant // Fixed: removed quotes around variable
});
}


View Convert data in Pendo

After integration is enabled and your experiment is activated, you will be able to find in your Pendo account the custom user data that you sent.