If the content is missing from your heatmap it may be because the Mouseflow heatmap snapshot is taken before all the content is loaded on the page. In order to resolve this, you will want to customize your Mouseflow tracking snippet using the mouseflowHtmlDelay variable.


Setup

To delay the heatmap snapshot you will want to customize your Mouseflow tracking snippet by adding the variable var mouseflowHtmlDelay = TimeInMiliseconds;

1. Start by copying the variable:

var mouseflowHtmlDelay = 5000;

When added to the Mouseflow tracking code this variable increases the time which Mouseflow waits to take the heatmap snapshot by 5,000 milliseconds giving asynchronous content a chance to load.

Note: We recommend setting a delay of 5000ms (5seconds), but you are free to change the delay time by altering the numerical value (e.g. 5000 = 5 seconds, 6000 = 6 seconds, etc).
You may need to experiment with the delay to find the perfect time frame for your website.

2. Go to your site and find the Mouseflow Tracking code you have installed there. Once you've found the tracking code please add the line of code you copied in step 1, right after the opening <script type ="text/javascript"> line.


Your tracking code should now look like the following Example (you can see the custom line of code that has been added on line two):

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


3. Once you've added the variable to your tracking code on all the relevant pages we recommend testing if the solution worked by visiting your own page in an Incognito Window in your browser. When you've visited your site you can open your heatmap to see if the delay has worked.

Hint: We recommend using an Incognito Window in your browser to avoid issues with the browser cache serving the old version of your Mouseflow tracking code.

Note: The test described in Step 3 only works if you haven't excluded your IP from being recorded in Mouseflow Settings: https://app.mouseflow.com/websites/settings

Did this answer your question?