Talk to a sales representative

+1 844-822-8378
or

Write to us

Google Analytics

Posted in Plugins on

Integrating Visual Website Optimizer (VWO) with Google Analytics (GA) allows you to push your VWO campaign data into GA’s custom variable or custom dimension. By integrating VWO with GA, you can build rich reports to help you gain more insight into how different campaigns perform on specific segments of visitors. VWO allows a single-click integration for both GA and UA.

Integrating with Universal Analytics (UA) (analytics.js)

In your GA dashboard, perform these steps:

  1. Click Admin from the menu bar and select the appropriate account and a property.
  2. Under Property, click Custom Definitions, and then Custom Dimensions.
  3. Click New Custom Dimension and complete the following details:
    IntegratewithGA1

    • Name: Enter a unique name for the dimension to avoid any confusions with other dimensions you may have created. For example, VWO Test Id 1
    • Scope: Select the User option from the drop-down. Scope determine which hits will be associated with the custom dimension value. Click here to know more about scope
    • Active: Enable this box to start collecting data and see the dimension in your reports right away.
  4. Click Create. You have now created the custom dimensions in UA.

After you create the custom dimensions in UA, go to your VWO dashboard and perform the following steps:

  1. Click Settings from the dashboard and select the Test Settings tab.
  2. Under Integration section, enable the Integration with Universal Analytics option as displayed in the following screenshot:IntegratewithGA2_(V2)
      • Dimensions: Select the custom dimension you have defined for VWO in your UA implementation.  Make sure to select a different dimension for each experiment, which is not used by another campaign or by other tracking activities. For example, if the custom dimension you have defined VWO test Id 1, it means the report corresponds to Campaign ID 1 in VWO.
      • UA Account Prefix: If you are using more than one GA account, you can enter GA Account Prefix you want integrate with VWO. Please leave the field empty if you are not sure which account prefix to use.

    Important: Please note that GA Account prefix is not the same as your GA profile ID. Account prefix indicates the your GA account where your want to push test data of a campaign.

    For example, you can send data from different sections of a web page to multiple web properties as follows:

    ga('create', 'UA-XXXX-Y', 'auto'); //Default tracker
    ga('create', 'UA-12345-6', 'auto', {'name': 'newTracker'}); // New tracker.

    Where UA-XXXX-Y is the Google Universal Analytics ID. Once the campaign starts, two tracker objects are created where the first tracker is the default tracking object and does not have a name. The second tracker will have the name of newTracker. To push your campaign data to the default tracker, leave the prefix field empty. To push your campaign data to the second tracker, enter newTracker in the prefix field in VWO.

Integrating VWO with Classic Google Analytics (ga.js)

Log in to you GA dashboard and perform these steps:

  1. In the Admin dashboard and click the Reporting tab.
  2. From the sidebar, select Audience and expand the Custom node.
  3. Click Custom Variables and select the appropriate Custom Variable Key to view your VWO reports. By default, VWO uses Custom Variable (Key 4) slot.

Using VWO dashboard, perform the following steps:

  1. Select Settings from the dashboard and select the Test Settings tab.
  2. Under Integration section, enable the Integrate with Google Analytics option as displayed in the following image:IntegratewithGA3_(V2)
      • GA Slot: This is the custom variable slot in Google Analytics that you want to use for VWO. By default, VWO uses GA key Slot 4 to push its variation data. If you have multiple campaigns, you must use a different slot for each campaign. You can change the slot if required. Please keep the default value if you are not sure which slot to use.
      • GA Account Prefix: If you are using more than one Google Analytics account on your website, you can enter GA Account Prefix you want integrate with VWO. Please leave the field empty if you are not sure which account prefix to use.

    Important: Please note that GA Account prefix is not the same as your GA profile ID. Account prefix indicates the your GA account where your want to push test data of a campaign.

    Example: Let us consider you are tracking a page with two or more Google Analytics accounts as follows:

    // Account 1
    _gaq.push(['_setAccount', 'UA-XXXXX-1']);
    _gaq.push(['_trackPageview']);
    
    // Account 2
    _gaq.push(['XYZ._setAccount', 'UA-XXXXX-2']);
    _gaq.push(['XYZ._trackPageview']);

    where, XYZ is the Google Analytics account prefix.

    If you want to track VWO data in Google Analytics account id: UA-XXXXX-2, then enter the prefix as XYZ. If you are not sure about which prefix to use, leave it blank.

    Note: VWO GA prefix is specific to VWO-GA integration and the prefix value is different from GA tracker ID.

Viewing test results in Universal Analytics

After you start the campaign in VWO, you can view the test reports by creating a segment in Google Universal Analytics as follows:

IntegratewithGA4

In this example, VWO is the custom dimension name, CampID is the campaign ID (155 in our example), and VarName is the the variation displayed to the visitor (Variation-1 in our example).

Viewing test results in classic GA

To view your campaign reports, log into GA and click on the relevant VWO test ID to view the corresponding report.

For example, if the report ID GA displays as ‘VWO-2’ it means the report corresponds to the VWO test ID 2 (you can view the test ID in your VWO). From the reports page, you view goal values for different variations, bounce rate, time on site, return visit, pages/visit, and so on. The following is a sample of the GA reports page:

IntegratewithGA5