Cross-domain tracking allows Mouseflow to track a user's session across multiple domain names where you have Mouseflow is installed.

Normally, this is not needed. However, if you are tracking a user's journey across multiple domains for example from a hosted landing page or checkout flow, where the domain name of those pages is not your main domain then enabling cross-domain tracking is required.

How to enable Cross-domain Tracking

First, ensure both domains are added under the Domain for the project in your Settings.

Next, navigate to the Apps & Integrations section for your domain project.

Then, click the Cross-Domain Support app:

Then, enable the app:

Once configured, visitors going from the first domain to the second domain will have one combined recording session.

Important notes

  • This will only work for navigation in the same window/tab. If the visitor opens the second page in a new tab or window, two separate recordings will be generated.

  • This will only work for direct navigation from one domain to the other. So the Mouseflow tracking code needs to be on the last page of domain 1 and the first page of domain 2.

  • If you're using a tag manager, you'll want to deploy Mouseflow and any modifications to the Mouseflow code, via a custom HTML snippet/tag.


If you have pages with the same name on both domains, and you would like to differentiate between the page names in the Mouseflow recordings, then you will need to update Mouseflow can apply this string to the tracking code:

var mouseflowPath = window.location.hostname + window.location.pathname;

Note: It is required that the mouseflowPath is loaded before the rest of the tracking code, e.g.:

<script type = "text/javascript">
var mouseflowPath = window.location.hostname + window.location.pathname;
var mouseflowCrossDomainSupport = true;
window._mfq = window._mfq || [];
(function () {
var mf = document.createElement("script");
mf.type = "text/javascript";
mf.defer = true;
mf.src = "//";

Did this answer your question?