VWO Logo
Like this post?
Read our in-depth guide to Conversion Rate Optimization
Share this post
4 Min Read

New Feature: Custom URLs for your A/B and Multivariate tests

placeholder
Paras Chopra
Founder and Chairman of Wingify.

Visual Website Optimizer has a feature that allows running of same A/B or multivariate test on multiple pages at once. For example, if your site has several product categories and you would like to run a test only on one category, all you need to do is to enter a URL pattern like http://example.com/shoes/* in Visual Website Optimizer.

The URL pattern above will make the test run on all pages in the shoes directory. This feature is very handy because you can test common call-to-actions, headers, footers, sidebars, etc. consistently on multiple pages at one go. What’s more, a consistent variation is shown on all the pages in a test. So if a user sees red variation on one shoes page, he will always see the same red variation on all other shoes pages.

Sometimes (primarily due to SEO reasons) there is no clear pattern in the URLs. That is, it may be possible that there are several independent URLs for category or product pages without any apparent pattern. For example, if there are URLs such as http://example.com/adidas/, http://example.com/reebok/, http://example.com/microsoft/, http://example.com/adobe/, etc. and you wish to run the test on only on shoes pages (the first two URLs), how are you going to do that? Until now it wasn’t possible to setup such a test, but with our new feature Custom URLs it is very simple to setup such tests.

How do I setup a custom URL test?

Actually, there are three easy steps if you want to use custom URLs:

  • Come up with an imaginary custom URL for all pages that need to be tested: note that the actual custom URL may not exist as we just want to come up with an identifier. For example, custom URL can be http://example.com/my_shoes_pages
  • Use that URL in VWO: while creating a test in VWO, enter that custom URL in the field where it asks whether test is to be run on multiple pages (URL pattern field)
  • Output that custom URL on your page in _vis_opt_url JavaScript variable: since the custom URL is imaginary, you need to output it in a _vis_opt_url variable on all pages you need that page to run the test.You also need to modify (common) VWO code snippet a little to accommodate custom URLs.

Example Code (Asynchronous):

On all pages where you need to run a specific test, output _vis_opt_url variable and modify VWO code as following (bold parts are extra modifications):

// Only on pages where this test is to be run var _vis_opt_url = 'http://example.com/my_shoes_pages'; var _vwo_code=(function(){ var account_id= ACCOUNT_ID, // your Visual Website Optimizer Account ID _vis_opt_url = window._vis_opt_url || document.URL, settings_tolerance=2000, library_tolerance=1500, use_existing_jquery=false, ... ... ... this.load('//dev.visualwebsiteoptimizer.com/j.php? a='+account_id+'&u='+encodeURIComponent(_vis_opt_url)+'&r='+Math.random()); ... ...

Example Code (Synchronous):

On all pages where you need to run a specific test, output _vis_opt_url variable and modify VWO code as following (bold parts are extra modifications):

<head> ... // Only on pages where this test is to be run var _vis_opt_url = 'http://example.com/my_shoes_pages'; ... ... ... // Common VWO Code var _vis_opt_url = typeof(_vis_opt_url)=="undefined" ? document.URL : _vis_opt_url; .... '&url='+encodeURIComponent(_vis_opt_url) +'&random='+Math.random() ... </head>

Sounds Complicated? We’ll help you implement

We do realize that the implementation is bit complex but we wanted to roll out the feature to all customers (many enterprise customers have been using it already). We are here to help you implement VWO code for custom URLs. Simply contact support@vwo.com if you need our help and assistance.

More from VWO

Have a sales page? Here are 3 extremely simple tips to improve it

You have a different audience than Copyblogger, Mashable and the New York Times. Their websites…

Read More
Karl Staib

Karl Staib

6 Min Read

Say Hello To Rich Push Notifications With Big Image Support

We recently teamed up with John Clark, founder of Yo! Free Samples, for a case…

Read More
Megha Rajeev

Megha Rajeev

6 Min Read

A/B Testing Ideas To Turn Your E-commerce Store Into A Conversion Magnet

Is your e-commerce website experiencing high traffic but low checkouts? Is your cart abandonment rate…

Read More
Shanaz Khan Khongthaw

Shanaz Khan Khongthaw

9 Min Read

Join 10,000+ Marketing, Product & UX Folks

Latest news, views & inspiration in experience optimization for driving growth

A value for this field is required.

Thank you!

Check your inbox for the confirmation mail