Heap

Last updated

Integrating the Heap Analytics tool with VWO helps you push data from campaign pages and monitor or compare campaign data by using the Heap dashboard.

The end-to-end process of integrating Heap with VWO involves the following steps:

  1. Add VWO code to the website
  2. Define VWO Segment in your Heap Account

Adding VWO code to the Website

Add the following code snippet on the pages where the VWO test is running. The snippet works with both Synchronous and Asynchronous code of VWO, regardless of the location.

<script type="text/javascript">
var _vis_opt_queue = window._vis_opt_queue || [], _vis_counter = 0;
_vis_opt_queue.push(function() {
try {
if(!_vis_counter) {
var _vis_data = {},_vis_combination,_vis_id,_vis_l=0;
for(;_vis_l<_vwo_exp_ids.length;_vis_l++) {
_vis_id = _vwo_exp_ids[_vis_l];
if(_vwo_exp[_vis_id].ready) {
_vis_combination = _vis_opt_readCookie('_vis_opt_exp_'+_vis_id+'_combi');
if(typeof(_vwo_exp[_vis_id].combination_chosen) != "undefined")
_vis_combination = _vwo_exp[_vis_id].combination_chosen;
if(typeof(_vwo_exp[_vis_id].comb_n[_vis_combination]) != "undefined") {
_vis_data['VWO-Test-ID-'+_vis_id] = _vwo_exp[_vis_id].comb_n[_vis_combination];
_vis_counter++;
}
}
}
// Use the _vis_data object created above to fetch the data,
// key of the object is the Test ID and the value is Variation Name
if(_vis_counter) {heap.addUserProperties(_vis_data);}
}
}
catch(err) {};
});
</script>

Define VWO Segment in your Heap Analytics Account

Sign in to your Heap analytics dashboard, and then select Segments. Create a new segment for the VWO test you want to track.

  1. Click New Segment.
  2. Select a category (in our example, VWO Test), or enter a new name for organizing your projects.
  3. Enter the VWO test ID for the segment in the format VWO-Test-ID-#, where # is a numeric test ID value. You will find the variation name displayed for the visitor in the test.
    In the example, the test ID is VWO-Test-ID-74.
  4. In the Filters field, select Operators value as is defined.
  5. Click Define Segment.

You can now view the data from VWO on your Heap dashboard.

How to View Your VWO Test ID

  1. Log in to your VWO dashboard, and then click the test you want to view.
  2. On the Test Details screen, select Settings and then click Summary.
  3. On the test summary screen, go to the Other Information section and then view the
    test ID.  The Campaign ID value is the test ID you must use for the integration.

Was this article helpful?

Thanks for your feedback!
Please email us at support@vwo.com to tell us what you were looking for. We'll send the answer to your inbox.

Contact Us / Login

Product
Resources Home