This website works best with JavaScript enabled. Learn how to enable JavaScript.

Hubspot

Last updated

If you are using Hubspot to collect your website data, integrating with VWO will help you collect visitor data of your landing page and also of all variations you create in your VWO tests. You can use this data to compare variations, get deeper insights from your VWO test, and implement changes that boost your conversions.

To enable this integration, you need to ensure that both VWO tracking code and Hubspot tracking code are enabled on your website. The end-to-end process of integrating Hubspot  with VWO involves the following steps:

  1. Enabling Hubspot Integration
  2. Viewing Events

Enabling Hubspot Integration

Follow these steps below to enable Hubspot Integration:

  1. Sign in to Hubspot Dashboard.
  2. Select the Reports drop-down and click Analytics Tools.
  3. Select the Events section.
  4. Click Create Event from the top right corner of the window.
  5. In the Create event section, enter the event name as VWO. You can leave the Tags field blank.
  6. Under Event Type, select Custom Event and click Next.
  7. Copy-paste the following javascript code in the Custom JavaScript section and click Save.
    // Hubspot – VWO Integration code
    (function () {
       window.VWO = window.VWO || [];
       window.VWO.push(['onVariationApplied', function (data) {
           if (!data) {
               return;
           }
           var expId = data[1],
               variationId = data[2];
           if (typeof(_vwo_exp[expId].comb_n[variationId]) !== 'undefined' && ['VISUAL_AB', 'VISUAL', 'SPLIT_URL', 'SURVEY'].indexOf(_vwo_exp[expId].type) > -1) {
               window._hsq = window._hsq || [];
               window._hsq.push(["trackEvent", {
                   id: "vwo_" + _vwo_exp[expId].name + "_" + _vwo_exp[expId].comb_n[variationId],
                   value: null
               }]);
           }
       }]);
    })();

Viewing Events

Go to the Reports section (Reports > Analytics Tools > Events) to view the events created in Hubspot to capture your VWO data.

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