Mon Oct 21 2024 02:41:38 GMT+0000 (Coordinated Universal Time)
The basic requirements for heatmaps to work are the presence of the Optimize token and the heatmap enabled attribute set to true
.
<script type="text/javascript">
window._monsido = window._monsido || {
token: "insert-your-monsido-token-here",
heatmap: {
enabled: true
}
};
</script>
<script type="text/javascript" async src="https://app-script.monsido.com/v2/monsido-script.js"></script>
The heatmap function will automatically run on page load. It will determine the heatmaps should run on a particular session based on how heatmaps have been configured for your Optimize account.
If heatmaps are applied to an SPA, by default, the heatmaps function runs on page load and sends its data when the page unloads.
It is possible to simulate an unload by using this command:
window.monsido_functions.sendHeatmapData();
You must restart the heatmap function after the URL has changed, using this command:
window.monsido_functions.resetHeatmap();
If this content did not answer your questions, try searching or contacting our support team for further assistance.