Mouseflow Help & Support

Coremetrics 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 Coremetrics, we can push up the "cm_mmc" (Coremetrics) URL parameter with 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 getParameter(sname) {
var params = location.search.substr(location.search.indexOf("?")+1);
var sval = "";
params = params.split("&");
for (var i = 0; i < params.length; i++) {
temp = params[i].split("=");
if ([temp[0]] == sname) { sval = temp[1]; }
}
return sval;
}

// Mouseflow tracking code
var _mfq = _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);
})();

if (window.location.href.indexOf('cm_mmc') > -1) {
var cm_mmc = getParameter('cm_mmc').split("-_-");
_mfq.push(["setVariable", "coremetrics_vendor", cm_mmc[0]]);
_mfq.push(["setVariable", "coremetrics_category", cm_mmc[1]]);
_mfq.push(["setVariable", "coremetrics_placement", cm_mmc[2]]);
_mfq.push(["setVariable", "coremetrics_item", cm_mmc[3]]);
}
</script>

 

You can now filter the recording list by any of the "coremetrics_X" variables. Pick a variable as the key and enter a value for the ID, accordingly.

Questions?

If you have questions or need help, feel free to open a ticket or call us at +1 (855) 668-7335.

Tags: integrate coremetrics third party service custom variables

Have more questions? Submit a request

Comments

Powered by Zendesk