Mouseflow Help & Support

Kissmetrics Integration

Follow

With Mouseflow, it's easy to push in data from third-party services to extend the native segmentation/filtering capabilities.

To integrate with KISSmetrics, we can hook into "km_ai" cookie to track users by the Kissmetrics Anonymous ID in Mouseflow. This integration makes use of our Custom Variables feature. Just replace your tracking code with the snippet below.

Example

<script type="text/javascript">

function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i=0; i<ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1);
if (c.indexOf(name) != -1) return c.substring(name.length, c.length);
}
return "";
}

var km_ai = getCookie('km_ai');

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

_mfq.push(["setVariable", "kissmetrics_id", km_ai]);
</script>

 

You can now filter the recording list by the "kissmetrics_id" variable -- pick "kissmetrics_id" as the key and enter a value for the ID, accordingly.

 

Tags: integrate kissmetrics third party service

Have more questions? Submit a request

Comments

Powered by Zendesk