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

You can also use our 'built in' integration to exclude countries from being recorded


To only track visits from a specific country, we can check the user's browser language.

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 only record visitors coming from specific countries you will have to add the snippet below to your Mouseflow Tracking code (varies with browser):

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.

When you've saved the changes you should begin seeing that all the recordings you get into Mouseflow from the country/countries you've chosen.

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?