With Mouseflow, it's easy to control which visitors get recorded. For example, you can record visitors who find your website through a Bing Ad.

To only track visits from Bing Ads, we can check for the "msclkid" (MSN Click ID).

This integration example uses the js-cookie library. Add it to your site by adding this line:

<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.1.4/js.cookie.min.js"></script>


<script type="text/javascript">
    if (window.location.href.indexOf('msclkid') > -1) { 
        Cookies.set('mf_record_user', 1, 10); 

    if (Cookies.get('mf_record_user')) {

        // mouseflow tracking code
        window._mfq = window._mfq || [];
        (function() {
            var mf = document.createElement("script"); mf.type = "text/javascript"; mf.defer = true;
            mf.src = "//cdn.mouseflow.com/projects/your-website-id.js";

Each new visit will only be captured if it originates from Bing Ads (with a msclkid URL parameter).