Skip to content

Instantly share code, notes, and snippets.

// Create and Download Usage Reports for All Websites
(function() {
const convertDataToCSV = (data) => {
let result = '';
let ctr = 0;
if (data === null || !data.length) {
return null;
}
columnDelimiter = ',';
(function recordingRatePerPage() {
const config = {
recordingRules: [
['base', '*', 5],
],
allowReroll: false,
cookieKey: 'mf_recordingRules',
};
const getLocationURI = () => {
let res = '';
@bensoutendijk
bensoutendijk / mfCaptureURLParameters.js
Last active December 10, 2020 16:02
Capture URL Parameters as Tags in Mouseflow
// This snippet of code will tag the pageview with the
// QueryString Variables found in the mfQueryVariables array
var mfQueryVariables = ["ref"];
function mfGetQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");