In this article, we will go over the basic functions that allow Mouseflow to integrate into almost any Cookie Consent popup you may be using on your website.

You can also simply disable Mouseflow from using cookies.

Option #1: Only load Mouseflow after consent is given

Many cookie consent popups offer a solution that allows you to only load tracking/analytics software after the user accepts the cookie policy. If this is part of the solution you are using, we recommend using this as the primary method for installing Mouseflow's tracking code on your pages.

Option #2: Prevent Mouseflow from starting automatically. Start Mouseflow after consent is given.

You can prevent Mouseflow from starting automatically on the page by adding the following code before the tracking snippet.

<script>
window.mouseflowAutoStart = false;
</script>

Then, after Mouseflow has loaded on the page, you can start Mouseflow at any time with the following code.

<script>
window.mouseflow.start();
</script>

The above code should run after the visitor has accepted your cookie policy.

Did this answer your question?