If you would like to take advantage of when Mouseflow is recording, you can do so by adding some custom code.

By default, when Mouseflow is set to record, the autostart property is set to true. Using the global window property below, you can set the application to record and customize the start and end dates.

Note: You will want to leave the website recording status - set to record.

Global Window Property

window.mouseflowAutoStart

Using the global window property above, you can set the date and time you want Mouseflow to start/stop recording. You can achieve this by setting the value to false/true.

You can modify the examples below to fit your requirements. Please note that the default time zone is set to UTC.


Example:

const currentDate = new Date(); //Returns current time in UTC

const endDate = new Date("April 20, 2023 12:25:00");
// Selected end date

window._mfq = window.mfq || [];
if (currentDate < endDate){

window.mouseflowAutoStart = true;

// Record the domain

}

Example:

const currentDate = new Date(); //Returns current time in UTC

const endDate = new Date("April 20, 2023 12:25:00");
// Selected end date

const startDate = new Date("April 20, 2023 1:00:00");
// Selected start date

window._mfq = window.mfq || [];
if (startDate < currentDate && currentDate < endDate){ window.mouseflowAutoStart = false;
}

Note: If you do not have access to the source code you may want to contact your website provider.

Did this answer your question?