Knowledge base | mouseflow

Usabilla Integration

With Mouseflow, it's easy to integrate with other tools like Usabilla. You can send the link to play back a specific session directly to Usabilla via their JavaScript API. This allows you to see a user's response(s) in Usabilla and then play their actual session to see its surrounding context.

Example:

<script type="text/javascript">

    // mouseflow tracking code
    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);
    })();

    // Usabilla integration code
    if (typeof usabilla_live == "function" && 
        typeof mouseflow == "object") {
        window.usabilla_live('data', {
            'custom':{'mouseflow_link': 
                'https://app.mouseflow.com/websites/' + 
                    mouseflow.websiteId + 
                    '/recordings/' + 
                    mouseflow.getSessionId() + '/play'}
        });
    }
</script>