The Heap integration with Qubit allows you to send experiment and variation data captured in Qubit into Heap as defined properties.
In Qubit, experiment data is exposed in a client-side object, qb_etc_data
. The keys are as follows:
c — variation id
ckg — creative key group
cm — active variation id
cnt — active variation index (control or X)
e — experiment id
i — iteration id
p — actual probability of user to bucket
pc — probability to bucket
You will need to use defined properties (similar to our Google Optimize integration) to sort out the experiment and variation IDs.
You can try this integration snippet by adding it directly to your codebase, or as a Snapshot, to achieve this. Note that it may miss the first pageview.
(function() {
var props = {};
var intervalCount = 0;
var intervalId = setInterval(function() {
if ((window.qb_etc_data) || (intervalCount < 100)) {
var name, value;
var exp = window.qb_etc_data;
if ("undefined" !== typeof exp) {
for (var i = 0; i < exp.length; i++) {
name = "Qubit: " + exp[i].e;
value = exp[i].cm;
props[name] = value;
}
heap.clearEventProperties();
heap.addEventProperties(props);
}
clearInterval(intervalId);
} else {
intervalCount++;
}
}, 100);
})();
Note that the mappings come from this bookmarklet.