With some extra customization to the tracking snippet, Mouseflow gives you the ability to record only visitors who enter your site through a specific landing page or Entry Page.

Modify your Mouseflow Tracking Script

To ensure that you only record visitors coming from your chosen Entry Page you will have to replace your existing tracking code with something that follows this format:

Example

<script type="text/javascript">
window._mfq = window._mfq || [];
var entryPageToRecord = "/entry-page";
function activateMouseflow() {
var mf = document.createElement("script");
mf.type = "text/javascript";
mf.defer = true;
mf.src = "//cdn.mouseflow.com/projects/{{website-id}}.js";
document.getElementsByTagName("head")[0].appendChild(mf);
};
if (window.location.pathname === entryPageToRecord) {
document.cookie = "mf_entrypage=1;path=/;"
}

var mfEntryPageCookie = document.cookie.indexOf('mf_entrypage=');

if (mfEntryPageCookie > -1) {
activateMouseflow();
}
</script>

Notes

  • You need to customize the path to the entry page (in this case "/entry-page" above).
  • Replace {{website-id}} with your unique website ID from Mouseflow on the "mf.src" line.
  • Test your code to make sure it has the desired functionality.

Once you've successfully updated your tracking code on all pages where you want the change to apply, please make sure to save your changes to the code.

When you've saved the changes you should begin seeing that all the recordings you get into Mouseflow will begin on the entry page you've chosen.

Did this answer your question?