New VWO code snippet: cleaner, faster, easier

Posted in News on September 7th, 2010

Today we’ve released a change in Visual Website Optimizer code snippet that will make the process of integrating VWO to your website a lot easier! As you will see, the change is a significant improvement over the previous code snippet and we recommend you to update it on your website as soon as possible to enjoy all its benefits (of course, it is backward compatible; So your existing VWO code will also work — but the new one is much faster).

The new code is cleaner and much easier to implement

The old snippet required you to insert code at two places: one in header and one in footer. The new code requires only one small snippet to be inserted into the website header. Yes, that’s it! No more you are required to add separate code snippets in header and footer.

Now, all the code required to run VWO, create and run unlimited number of A/B and multivariate tests, measure conversion rates, track heatmaps and clickmaps, etc. is contained in one snippet at a single location. This is what we call as single-tag integration! See, the screenshot below on which code snippet you need to add to integrate VWO with your website:

The new code is faster

The old code downloaded the static JavaScript file (required to run VWO) on all pages irrespective of whether a test is running on the page or not. It meant that the static file was downloaded for all your site visitors even if you are not running any test or test is only running on certain parts of your website.

The new code downloads the static JavaScript file only if and when it is needed. That is, the file is downloaded if a test is to be run on a particular page. Otherwise, it is simply skipped. What this means is a much faster experience for visitors to your website who aren’t included in the test.

We strongly recommend you to update to the new code! You can find the updated code in your test reports (under section Add code to website section)

3 Comments »

How to track conversions on subdomains or separate domains (3rd party apps)

Posted in A/B Split Testing, How To on March 6th, 2010

If you want to track conversions for an A/B test (created using Visual Website Optimizer) that aren’t on the same domain, you will find this post useful.

How to track conversions on a separate subdomain

UPDATE: now subdomains are tracked by default. You don’t need to do any additional settings or add any extra code (such as the one below).

By default the cookies set by VWO is available only on the main domain (and not subdomains). For example, VWO cannot read any cookies for conversion purpose at “secure.example.com” if the test was running at “example.com”. To enable site-wide cookies, you need to specify your main domain. And to do that, simply add the following code (in bold) at the top of your VWO code:

<script type='text/javascript'> var _vis_opt_domain = 'yourdomain.com'; var _vis_opt_account_id = XXXX; var _vis_opt_protocol = (('https:' ....

Only the code in bold is what you need to add. Rest is the default VWO code. Of course, you will replace yourdomain.com with whatever your domain may be.

How to track conversions in a separate domain (or 3rd party apps)

UPDATE: now conversions on a separate domain are tracked by default. You don’t have to do any extra settings. See this blog post for more details.

No matter what settings we do, on different domains cookies cannot be read. So, we will have to use a trick for tracking conversions on pages present on a separate domain. Take following steps to implement this method:

  • Create a simple blank page on your website (named conversion.html or whatever name pleases you) , add VWO code into it and define a visit to that page as the goal of your test.
  • Now insert following HTML code on the page located at a separate domain which you want to consider as a conversion page:
    <iframe src='http://yourdomain.com/conversion.html'
    height='1' width='1'>
    </iframe>

That’s it. Now you can track conversions for your A/B tests on subdomains and even on separate domains.

2 Comments »

Stay up to date

Latest Posts

Latest Tweets

Send us a message, quickly!

Your Name

Your Email

Your Message

Or, contact us through email info@wingify.com