Skip to content
  • Home
  • Developers
  • API
  • Releases
  • Community
  • University
  • Status
  • Home
  • Developers
  • API
  • Releases
  • Community
  • University
  • Status
Home Integrations A/B Testing & Personalization Qubit Integration
Session Replay Getting Started Administration Data Management Definitions Charts Analysis Examples Heap Plays Integrations Heap Connect Data Privacy

Table of Contents

Was this article helpful?

Yes No

Thank you for your feedback!

Qubit Integration

This doc is for: Admins Architects

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.

Was this article helpful?

Yes No

Thank you for your feedback!

Last updated February 17, 2022.

integrationqubitqubit source
  • Blog
  • Partners
  • Legal
  • Security
  • Terms
  • About
  • Careers
  • Privacy
  • Contact Us

© 2023 Heap, Inc.