Skip to main content

Testing Multiple Versions of a Website (A/B Testing)

Track and compare page variations with Mouseflow.

Updated over a month ago

A/B Integrations

Mouseflow can record sessions for multiple versions of a page and display each version of the page as a separate heatmap. This is especially useful when running A/B tests so you can compare user behavior and conversions between variations.

Here is a list of guides we have for integrating Mouseflow with A/B Testing tools:

Don't see your tool? You can also configure manually!


Manual setup

If your testing tool is not listed above, you can configure manually.

Let’s say you want to test two versions of your homepage - version A and version B. If you’re testing version A, then you tell Mouseflow (by manually pushing a path on the page) that the path will be: /home/version-A. Or if it’s version B: /home/version-B.

This is done by adding a line of JavaScript to modify how Mouseflow tracks the page’s path.

An example of the modified Tracking Code would look like this:

<script type="text/javascript"> 
// by default the mouseflowPath variable will read as 'version-A'
var mouseflowPath = "/landingpage/version-A";
// unless the pageVersion 'B' is detected
if (pageVersion === "B")
mouseflowPath = "/landingpage/version-B";

window._mfq = window._mfq || []; (function() {
var mf = document.createElement("script"); mf.type = "text/javascript"; mf.defer = true;
// replace your-website-id with your Mouseflow website ID
mf.src = "//cdn.mouseflow.com/projects/your-website-id.js";
document.getElementsByTagName("head")[0].appendChild(mf);
})();
</script>

Mouseflow will then display /home/version-A and /home/version-B separately in both the Session Replay list and the Heatmap list.


By using either an integration or a manual setup, you can easily compare user interactions between A/B test variations in Mouseflow. Each version will have its own heatmap and session list, making it simple to analyze results!

Note: If you are using any of our built-in Apps & Integrations, please contact support@mouseflow.com to ensure that manually setting the path will not cause issues.

If you have further questions or need assistance, please reach out to our Support Team at support@mouseflow.com or through the in-app messenger.

Did this answer your question?