To install Mouseflow, simply paste the entire code snippet to any page(s) you want to track before the closing body tag (</body>).

Note: This code snippet is just a sample. Please use the one from your account.

Mouseflow is loaded asynchronously, so it won't slow down or interrupt your site's rendering. We find that most clients install Mouseflow site-wide via their footer template or tag manager, though you can certainly limit it to specific pages if you wish.

Generating a Recording

After installation, browse to a page that has the code installed and click/move your mouse. Then, open the website in your Mouseflow account and click "Recordings" to view the first result.

Note: It can take a few minutes for the first recording(s) to appear; after that, Mouseflow will be near instantaneous.

By default, Mouseflow excludes all password and credit card number fields automatically.

Blocking Yourself

If you want to exclude your own sessions, you can block IP addresses. This can either be individual IP addresses, a list of IP addresses, or an IP address pattern using wildcards (e.g. 11.22.* will block 11.22.33.44, 11.22.44.55, and so on).

You can also opt-out of being recorded using the cookie method on our public opt-out page. We recommend including a link to this page from your privacy policy, as well.

Advanced Installation

In some cases, you'll want to customize the installation for Mouseflow. We have a few different options, depending on your needs.

A/B Testing

If you run A/B tests on your site, it's useful to have separate heatmaps for each test variation (so you can compare the results).

You can indicate a custom heatmap (bucket) for each variation that data should flow into -- this is done with a simple variable:

This assumes a variable called variationId is provided (by the A/B testing tool) that contains the unique ID associated with the variation. The end result would be var mouseflowPath = '/product-a'; or similar.

Note: It is important to include the forward slash in front of the mouseflowPath.

Merging Several Pages Into One Heatmap

If your site has many pages that share a similar layout, it can be helpful to combine/aggregate data into a single heatmap. For example, e-commerce websites have category and product pages that have a similar structure: these are perfect candidates.

You can customize how pages are merged in under Settings > Advanced settings > Merge URLs (once you open a specific website in Mouseflow).

Custom Variables/Tagging

With Mouseflow, you can associate your own custom data with a recorded session. It's important to note that this feature cannot be used to push sensitive or personal information into Mouseflow. This is useful for any website that wants to find sessions by a data layer variable or order ID, for example.

To enable it simply add a line to the main tracking code to associate a key/value pair with the session.