With Mouseflow, your visitors coming from Google Ads links will automatically be tagged with their "gclid" (Google Click ID) in our app.

However, you may want to record only traffic coming from clicks on your Google Ads. In this case, you can also control which visitors get recorded.

To only track visits from Google Ads, we can check for the "gclid" for all visitors who come to your page). We can use JavaScript and browser cookies to only record users who enter your website with this "gclid" in the URL.

To get started, you will want to modify your tracking snippet. This can be done in a number of ways. The basic HTML installation of Mouseflow will be modified like so:

<script type="text/javascript">
    if (window.location.href.indexOf('gclid') > -1) document.cookie = 'mf_record_user=1; path=/';

    if (document.cookie.indexOf('mf_record_user=1;') > -1) {
        // Mouseflow Tracking Snippet goes here...

Each new visit will only be captured if it originates from Google AdWords (with a gclid URL parameter).