Amplitude

Last updated

Integrating VWO with Amplitude web analytics allows you to push and monitor your website visitor data. The integration process involves the following steps:

  1. Adding a code snippet to campaign pages
  2. Finding your VWO Test ID

Adding VWO Code to Test Pages

  1. Add the following code snippet to the pages you want to track. The code 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, identify;
    _vis_opt_queue.push(function() {
    //amplitude.getInstance().logEvent('VWO');
    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") {identify = new amplitude.Identify().set('VWO-Test-ID-'+_vis_id, _vwo_exp[_vis_id].comb_n[_vis_combination])
    amplitude.getInstance().identify(identify);_vis_data['VWO-Test-ID-'+_vis_id] = _vwo_exp[_vis_id].comb_n[_vis_combination];
    _vis_counter++;
    }
    }
    }
    }
    }
    catch(err) {};
    });</script>
  2. After adding the VWO code to the website:
    1. Sign in to the Amplitude dashboard, and then click the Browse tab.
    2. Select Create Chart on the upper-right side of the dashboard.
    3. Select the visitor data, such as Event Segmentation, you want to push. In the Events column, select Any Event.
    4. In the user performance column, create a segment for Control and Variation-1 where the user property is VWO-Test-ID(XX) = Control, Variation-1.
    5. To finalize the integration, click Save.

Finding Your VWO Test ID

To view campaign/test ID in the VWO dashboard:

  1. From the dashboard, select the test for which you want to view the ID.
  2. On the details page, select Settings > Summary.
  3. To view the Test ID, go to the Other Information section of the page.

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