Mouseflow Help & Support

Record Visitors By Specific Language

Follow

With Mouseflow, it's easy to control which visitors are recorded. For example, you can record visitors based on their language setting.

Record Visitors with "en-US" Language

To only record visitors with "en-US" as their language, surround your tracking code with the following lines (in bold):

<script type="text/javascript"> 
if(window.navigator.language == "en-US") {
window._mfq = window._mfq || [];
(function() {
var mf = document.createElement("script"); mf.type = "text/javascript"; mf.async = true;
mf.src = "//cdn.mouseflow.com/projects/your-website-id.js";
document.getElementsByTagName("head")[0].appendChild(mf);
})();
}
</script>

Record Visitors without "en-US" Language

To only record visitors without "en-US" as their language, surround your tracking code with the following lines (in bold):

<script type="text/javascript"> 
if(window.navigator.language != "en-US") {
window._mfq = window._mfq || [];
(function() {
var mf = document.createElement("script"); mf.type = "text/javascript"; mf.async = true;
mf.src = "//cdn.mouseflow.com/projects/your-website-id.js";
document.getElementsByTagName("head")[0].appendChild(mf);
})();
}
</script>

 

Here is a list of other language-country codes.

 

Tags: record visitor track specific language country

Have more questions? Submit a request

Comments

Powered by Zendesk