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.

VWO 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 https://example.com/shoes/* in VWO.

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 https://example.com/adidas/, http://example.com/reebok/, http://example.com/microsoft/, https://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 https://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 VWO 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

Thanks to CloudFront, VWO is faster than ever

Continuing our mission to juice up backend infrastructure of VWO, today we switched to a…

Read More
Paras Chopra

Paras Chopra

2 Min Read

How to Leverage eCommerce Conversion Optimization Through Different Channels to Maximize Growth

Note: This is a guest article written by Sujan Patel, co-founder of Web Profits. Any…

Read More
Sujan Patel

Sujan Patel

8 Min Read

A/B Testing Case Study: Redoing Navigation Bar on Homepage Increased Sales By 15.68%

The Company Harvard Business Services is a Delaware-registered agent and helps people incorporate their companies…

Read More
Taruna

Taruna

3 Min Read
>
Shanaz from VWO

Hi, I am Shanaz from the VWO Research Desk.

Join our community of 10,000+ Marketing, Product & UX Folks today & never miss the latest from the world of experience optimization.

A value for this field is required.

Thank you!

Check your inbox for the confirmation mail