Mouseflow gives you complete control over what visitors get recorded. For example, you can exclude visitors coming from specific countries from being recorded.

We generally recommend using our 'built in' integration to exclude countries from being recorded - this is both faster and easier to set up.

You can also filter traffic to only record visitors from specific countries in a similar way.


To exclude visitors from a specific country from being recorded by Mouseflow, we can check the visitor's browser language before starting the recording. The easiest way to do this is by using the built in Mouseflow extension. You can enable the extension by:

1. Log in to your site and locate your Mouseflow Tracking Script

You will usually find your tracking script in the backend of your website.

2. Modify your Mouseflow Tracking Script

To ensure that you don't record any visitors coming from a specific country you will have to add the snippet below to your Mouseflow Tracking code:

if (window.navigator.language !== "en-US") { 
// Mouseflow Tracking Snippet goes here...

The "en-US" in the code designates the Language (in this case US English). Please find a list of other language-country codes here.

Note: If you're using Google Tag Manager please see our article on modifying the Mouseflow tracking code in GTM.

An example of the modified Tracking Code would look as follows:

<script type="text/javascript">
if (window.navigator.language !== "en-US") {
// mouseflow tracking code
window._mfq = window._mfq || [];
(function() {
var mf = document.createElement("script");
mf.type = "text/javascript"; mf.defer = true;
mf.src = "//";

Once you've successfully updated your tracking code on all pages where you want the change to apply, please make sure to save your changes to the code.

Note: Due to browser caching changes to the Tracking Code and Recording Script may take up to 48 hours to take full effect.

Did this answer your question?