Make MS Clarity track landing page variants

Claire Boston 0 Reputation points
2025-01-19T02:49:12.8133333+00:00

I'm using MS Clarity to track traffic on an Unbounce landing page. I have set up an a/b test on the landing page so there are two variants A and B. Currently Clarity only tracks the single page as if there aren't two variants. I need to know what I need to add to the javascript to track each variant separately. I'm currently using Mouseflow to do this, but I was given the code, so I don't know how to adjust it to make it work for Clarity. The javascript code which I think tracks the variant is

var mouseflowPath = window.location.host + window.location.pathname + window.ub.page.variantId;

Does anyone know what code I need to track the variant of the landing page?

Thanks

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,030 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.