Integrate Convert Experiences with Mouseflow
Visualize Convert Experiment Data with Mouseflow Session Recordings
| Author: |
Dionysia Kontotasiou
|
THIS ARTICLE WILL HELP YOU:
- Convert-Mouseflow Integration
- Add Tracking Code Snippets
- Activate Integration in Convert
- Activate Integration Manually
- View Convert Data in Mouseflow
Convert-Mouseflow Integration
Integration of Mouseflow with Convert Experiences will help you to import Convert data into your Mouseflow account.
For each experiment, the integration uses a unique variable 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 Mouseflow tracking code are installed on your page.

Activate Integration in Convert
Go to your Convert experience settings and under Integrations select the Mouseflow. Automatically code will set a Mouseflow custom variable so you can filter the list of results by experiment name and variation name. Then click Save and Continue:

Activate Integration Manually
If you do not want to activate the integration through Convert Experiences, you can create your own custom variables and push them to Mouseflow as described here.
Example code to send the Variation Name:
window._mfq = window._mfq || [];
(function() {
var mf = document.createElement("script");
mf.type = "text/javascript"; mf.async = true;
mf.src = "//cdn.mouseflow.com/projects/f78eaa82-c86f-4689-8bac-5ed02bf00715.js";
document.getElementsByTagName("head")[0].appendChild(mf);
})();
// Get config data - handle both structures (legacy and latest)
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 ");
window._mfq.push(["setVariable", "Variation Name", curVariant]);
}
View Convert Data in Mouseflow
Login to your Mouseflow account, got to Recordings and access the filter options. Click the filter (funnel) icon in the top-right (blue bar) and then, under Variables, select the appropriate experiment and value (either a variation name, * (for all variations to be combined), or ^ (for all variations to be removed).
This lets you filter for a page (with all variants combined into one), exclude all variants from a page (to view traffic not bucketed into tests), or view a specific variation for a page.
