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

Integrate Convert Experiences with Klaviyo

 Connect Convert with Klaviyo for Enhanced Email Personalization & Audience Insights

 THIS ARTICLE WILL HELP YOU:



Convert-Klaviyo Integration

Klaviyo helps growth-focused eCommerce brands drive more sales with super-targeted, highly relevant email, Facebook and Instagram marketing.

For each experiment, the integration uses custom events to 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 Klaviyo snippet are installed on your page. Once you have added the codes to your website, you will be able to use Klaviyo account to start sending more personalised emails to your customers through smart data decisions.  

Activate Convert-Klaviyo Integration 

Add the code below to Project > Configuration > Global Project Javascript. It sends Convert experience and variation names to your Klaviyo account with event tracking. It waits until Convert has evaluated the experiences on the page, then sends one event for each experience the visitor is in. When data anonymization is on in your project, it sends the experience and variation IDs instead of the names.

This code works with the current Convert tracking script. If your project still uses the Legacy tracking script, move to the current script first. For more on the window.convert object, see The window.convert Object in the developer docs.

window._conv_q = window._conv_q || [];
window._conv_q.push({
what: 'addListener',
params: {
event: 'snippet.goals_evaluated',
handler: function () {
var rows = getConvertData();
window._learnq = window._learnq || [];
rows.forEach(function (row) {
_learnq.push(['track', 'Convert Experience', {
'Experience': row.experienceName,
'Variation': row.variationName
}]);
});
}
}
});

// Returns the experiences the visitor is in on this page, with their variation.
// With data anonymization on, it uses IDs instead of names.
function getConvertData() {
var rows = [];
var current = convert.currentData.experiences || {};
var configured = convert.data.experiences || [];
var settings = convert.data.project && convert.data.project.settings;
var anonymize = !!(settings && settings.data_anonymization);
for (var experienceId in current) {
if (!current.hasOwnProperty(experienceId)) continue;
var variation = current[experienceId].variation || {};
var experience = configured.filter(function (e) {
return String(e.id) === String(experienceId);
})[0];
rows.push({
experienceId: experienceId,
variationId: String(variation.id),
experienceName: anonymize ? experienceId : (experience ? experience.name : experienceId),
variationName: anonymize ? String(variation.id) : variation.name
});
}
return rows;
}

View Convert Data in Klaviyo

Using a custom event, you will be able to view all of your Convert Experiences data as they associate to the values that you pass in the event in your Klaviyo account.