Home | Features | Pricing | Case Studies | Blog | Login

Say hello to Google Analytics plugin for Visual Website Optimizer

It is #1 feature requested and here you have it. This blog post introduces the new plugin for the Google Analytics. Using the plugin, you can easily benchmark multiple metrics across different variations. For example, you may find out that while your winning variation has reduced bounce rate significantly, it may actually be reducing average visitor time on site as well. Viewing results from multiple perspectives allows one to getter a better idea on the expected behavior of winning variation.

For integrating Google Analytics with Visual Website Optimizer, you will have to sandwich a snippet of code (in bold font below) in your existing Google Analytics tracking code (most likely present at the bottom of your website HTML):

<script type="text/javascript"> var pageTracker = _gat._getTracker("XX-XXXXXX-X"); pageTracker._initData(); if (typeof(_vis_opt_GA_track) == "function") { _vis_opt_GA_track(); } pageTracker._trackPageview(); </script>

The process for Asynchronous code snippet is similar:

_gaq.push(['_setAccount', 'XX-XXXXXX-X']); if(typeof(_vis_opt_GA_track) == "function") { _vis_opt_GA_track(); } _gaq.push(['_trackPageview']);

In other words, the code in bold (javascript function  _vis_opt_GA_track()) needs to be added just before the Google Analytics code snippet _trackPageview

After you have added the code, the integration is done. No more settings, no more configuration. For all tests, the Google Analytics intergration will start automatically.

To see A/B test reports in Google Analytics, click on Visitors in the sidebar and then click on Custom Variables report. Then click on the test id (available from VWO reports page) corresponding to the test you want to see a report for. An example of the report name in GA would be “VWO-2” which means it is a report corresponding to test with id 2. In the report you can see goal values for different variations plus you can also see different metrics such as bounce rate, time on site, return visit, pages/visit, etc. corresponding to the variations. The reports look something like the following screenshot (click to expand):

As you can see, different variations have different bounce rate and time on site. If we had configured goals in GA for this site, we could have tracked performance of variations on multiple goals as well. We can also define an advanced segment for a variation to do any kind of complex analysis that GA allows us to do. How cool!

Before you get too excited, please note following important points regarding the plugin:

  • By default, the plugin will work perfectly ONLY if you have one test running on your website running at a time (the limitation is because Google Analytics provides limited slots to store customer variables). In order to track multiple tests simultaneously, see the technical note below.
  • The reports you see in Google Analytics are indicative, at best. GA won’t show you statistical significance for any result – so interpret the results with care.
  • Unlike VWO, Google Analytics reports aren’t realtime – so allow atleast 1-2 days for data to show up in GA reports.
  • You can add the integration code site-wide (even on the pages where VWO is not running). The plugin will not affect your GA tracking in any manner.


Technical note:VWO uses GA’s 4th custom variable slot by default. If you would like to change it (either because you already use if for a different purpose or you want to track multiple tests in GA), add the following code before any GA code:

<script type="text/javascript"> var _vis_opt_GA_slot = YOUR_CUSTOM_SLOT; // a number between 1-5 </script>

Leave a comment here if you cannot get the plugin to work for you or you have trouble understanding what code to add or where to add.

Related posts:

  1. Visual Website Optimizer – first major update
  2. New feature: select date range for Visual Website Optimizer reports
  3. Bunch of small, new features in Visual Website Optimizer
  4. Guess the A/B test winner and win $3000 worth Visual Website Optimizer Subscription
  5. Thanks to CloudFront, Visual Website Optimizer is faster than ever

21 Comments »

  1. Is it possible to create a version of this for Clicky analytics (http://www.getclicky.com)

    ~ David

    Comment by David CrowtherMarch 3, 2010 @ 3:52 am

  2. Hey David, I can help you with the integration if you want.

    -Paras

    Comment by Paras Chopra — March 4, 2010 @ 5:59 pm

  3. Thanks Paras. It’s on my task list.

    Comment by David CrowtherMarch 5, 2010 @ 7:17 pm

  4. Which of the 5 slots do you use? Can we configure that?

    Comment by André ScholtenApril 13, 2010 @ 8:12 pm

  5. VWO uses slot 4. Currently it isn’t possible to customize that but would you like to do it?

    Comment by Paras Chopra — April 13, 2010 @ 8:17 pm

  6. Well, sometimes we use something like gaTracker instead of pageTracker, and sometimes we use the async version of the Google Analytics tracking code. And some clients already use slot 1 to 4, and then it’s good to have a choice.

    Comment by André ScholtenApril 13, 2010 @ 8:21 pm

  7. Great idea, we can easily build that feature into the integration code. Let us know when you are on it.

    Comment by Paras Chopra — April 13, 2010 @ 8:22 pm

  8. [...] integration with Google Analytics, Omniture SiteCatalyst and other analytics packages will let you track performance of variations on [...]

    Pingback by Yummier than freshly baked cookies: multiple conversion goals for an A/B or multivariate test « I love split testing – Visual Website Optimizer BlogApril 28, 2010 @ 7:53 pm

  9. Hi Paras

    Just want to say that this is a killer integration. Reeeaaaally love this.

    The option of choosing slot yourself would be real great, it makes it much more flexible. And would make it possible to track 5 different test on the same site at a time. That is relevant when having 5 landingpages with its own order flow :)

    Comment by Jacob KildebogaardApril 28, 2010 @ 9:34 pm

  10. Hi Jacob,

    Yes, in the next version (coming out this week) we will be providing a code snippet that allows specifying which slot to use. Stay tuned!

    -Paras

    Comment by Paras Chopra — April 28, 2010 @ 9:49 pm

  11. To all who requested GA custom slot, updated the code and post to allow that!

    Comment by Paras Chopra — April 29, 2010 @ 4:49 pm

  12. Hi,

    We’re using Google Analytics asynchronous tag.
    Is the integration of VWO will be the same as the code you show upon?

    Example:

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-xxxxxxx-x']);

    if (typeof(_vis_opt_GA_track) == “function”) { _vis_opt_GA_track(); }

    _gaq.push(['_trackPageview']);
    (function() {
    var ga = document.createElement(’script’); ga.type = ‘text/javascript’; ga.async = true;
    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
    var s = document.getElementsByTagName(’script’)[0]; s.parentNode.insertBefore(ga, s);
    })();

    Thanks

    Comment by Vincent — June 1, 2010 @ 2:08 pm

  13. No, it won’t be the same. Just wait a couple of days – we are releasing a plugin compatible with Async code.

    Comment by Paras Chopra — June 1, 2010 @ 2:30 pm

  14. Paras,

    Any reason why this doesn’t work?

    if (typeof(_vis_opt_GA_track) == “function”) {
    var pageTracker =
    _gaq._createAsyncTracker(analyticsCode, ‘pageTracker’);
    _vis_opt_GA_track();
    }

    Comment by Lachlan DonaldJune 2, 2010 @ 7:08 am

  15. The code doesn’t yet work with asynchronous GA snippet. We will be soon updating the VWO code to make it work. Will keep you informed.

    Comment by Paras Chopra — June 2, 2010 @ 3:00 pm

  16. UPDATE: It is now possible to use VWO plugin with GA asynchronous code snippet. See the update in the post.

    Comment by Paras Chopra — June 3, 2010 @ 12:06 pm

  17. Hey Paras, just stumbled across this the other day — apparently it is possible to have more than 5 custom variables: http://analyticsimpact.com/2010/05/24/get-more-than-5-custom-variables-in-google-analytics/

    fwiw.

    Comment by Luke StevensJune 11, 2010 @ 9:46 am

  18. Paras:

    Do you have a plug-in that works with getclicky.com now?

    Thanks,

    - Alex -

    Comment by Alex Nghiem — August 10, 2010 @ 8:54 pm

  19. No, not yet. Are you looking forward to that?

    Comment by Paras Chopra — August 10, 2010 @ 9:41 pm

  20. Paras:

    Yes, I need integration with GetClicky.com

    Even if there isn’t a plug-in, is it possible to use your tool with GetClicky?

    Thanks,

    - Alex -

    Comment by Alex Nghiem — August 23, 2010 @ 11:42 pm

  21. Alex, yes of course, you can use it with Clicky. There will be no conflicts.

    Comment by Paras ChopraAugust 23, 2010 @ 11:47 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Visual Website Optimizer

Grab this badge



Search Blog



Subscribe blog via RSS


Latest Posts



Latest Tweets Follow Wingify on Twitter

Follow Wingify on Twitter