Here at Somebody Digital, we use a wide range of tactics when doing digital marketing for our clients.
We use inbound and onsite SEO to ensure our clients are ranking on Google, structure ad campaigns through PPC, and use a mix of organic and paid social to bolster their presence on all social media platforms.
Another important area we focus on is Conversion Rate Optimisation (CRO), through this we find ways to continue to optimise websites to increase conversions. We do this by using multiple tools for analysis to spot areas for improvement and based on this we implement A/B testing to change key areas on the site, looking at both functionality and design.
For instance, through our analysis we may see that the converting CTA is not getting enough visual attention compared to other components on the site. Something that we may do here is change the colour to show more contrast, for example changing it to have a blue background instead of a grey one:
We would do this by running an A/B test to see the impact that this change had on conversions. Through this A/B test, weโd show 50% of visitors the old CTA and 50% the new CTA. We would then track performance through click tracking, visits to converting pages and conversion rate to see the impact of the new design.
Itโs a neat process, and one that can boost your conversion rates by a serious margin.
So in todayโs article, we are going to show you how it all works, by walking you through the setup of a simple A/B test in one of the tools we use VWO.
1. Create an A/B Test Campaign
So letโs start with the basics. Upon logging into VWO, youโll see one of two things.
If youโve built some VWO tests before (or have worked with an agency who has), youโll see a list of them under โTestingโ and then โA/B testsโ in the left hand column. As is the case in the below example, since weโve already built some tests for this client.
On the other hand, if this is your first A/B test, youโll see this screen instead:
Which merely tells you that no tests exist yet, and gives you more information about how to build them.
So to Create a new test, click the blue button in the upper right-hand corner labelled โCreateโ to move to the next part of the form.
This will then bring you to the following screen:
As you can see, said screen provides options for the test name, the URL(s) it runs on, the hypothesis and conditions that need to be met for a user to be entered into said test.
Name your A/B test
Weโll start with the test name. Click the pencil icon next โNew Campaignโ.
By doing so, youโll have the ability to type in the name for the test, you can call it whatever you like hereโฆ
Set the URL(s) you want the A/B test to run on
Then scroll down to the URL box. Here you can type the URL of the page you wish for the test to run on.
This will only be the case if you want the test to only run on one page. However, this wonโt be the case in this tutorial.
Instead, we want the test to run site wide. So click the โAdvanced Settingsโ box to open up some more URL options.
This will then give you the ability to run the test on all pages whose URL starts with a certain term, ends with a certain term, contains a certain term, etc. Set the dropdown so it says โcontainsโ, and then type the domain name for your site into the box.
And then add the full URL of the homepage into the preview URL box.
This will make sure the test runs site wide, as well as make sure VWOโs preview button opens the siteโs home page when clicked.
Set a Hypothesis
Onto the hypothesis now. This is a new feature VWO added in a recent update, it lets you enter a hypothesis for each test to refer back to, as well as indicate the level of confidence you have in said hypothesis.
Itโs a neat feature to fill out if youโre running a real test, and should be used in that situation.
However, weโre not running a real test here. Weโre running a tutorial, and the hypothesis doesnโt really add anything in this case. So for the sake of this demo just type whatever you want into the boxes provided and set all the confidence scores to three.
That takes care of the main fields on this page.
But the page doesnโt end there. Nope, it also provides a few extra options at the bottom too.
2. How to set up the visual editor
These are found in the โMore Optionsโ box, and basically provides you with the ability to choose the editor, choose the display size of the visual editor and choose who gets entered into the test respectively.
So start out by checking the โOpen in code only Modeโ box. This is super important, since it lets you write your own code rather than get stuck wasting time in the visual editor.
And itโs vital for pretty much any and all tests that run on sites with dynamic content, like social networks, eCommerce sites or wikis.
Thatโs because VWOโs visual editor is designed to replace static text content with other static text content, and is unsuited to making changes to parts of a site which are dynamically updated, whether thatโs through a server side process or a client side one.
Hence if you use the visual editor to edit one of these sites or sections, your beautifully crafted A/B test variation will run into serious trouble the minute someone logs in, edits a page or posts a message to their user profile.
Or worse still, youโll break said features altogether, making your site unusable in the process.
Trust us on that one. We made that mistake as well.
So unless youโre editing static content, or only making CSS changes, always check this box when creating a test.
Similarly, always ignore the next box. Itโs not going to affect anything if youโve checked the code only one, but itโs redundant given it only affects the visual editor in the first place.
Set user targeting
Finally, click the option to โEnable campaign for a specific user groupโ.
This adds a whole host of options for user targeting, letting you run the campaign for users using a specific browser, device, IP address or a whole host of other factors. For this demo campaign however, weโll only be running the test for desktop and tablet users.
So click โCustomโ on the left-hand side, then choose to run the test when the userโs Device Type is equal to either Desktop or Tablet:
Once youโve done that, click โNextโ to move onto the editor.
3. How to add custom code
This is where you have to add the necessary JavaScript and CSS code for your test. This requires some knowledge of front end web development, especially if you want to do anything fancy like add a dynamic filter system or load new content asynchronously via AJAX.
For now though, weโll keep it simple. Type the following code in the JavaScript tab:
var test = document.createElement(โasideโ);
test.classList.add(โfixed-asideโ);
test.innerHTML = โThis is a testโ;
document.body.appendChild(test);
And the code below in the CSS one:
fixed-aside {
background: #fff;
border: 1px solid #222;
bottom: 20px;
padding: 15px;
position: fixed;
right: 20px;
}
This will add a static box to your website in the bottom right corner with the sentence โThis is a testโ written in it. Said box will then scroll along with the page window, remaining 20px from the bottom right of the screen at all times:
Once youโve added the code, click โNextโ again to move on. This will then bring you to the goals page.
4. How to set up your Goals/Metrics
Here you put the conversion in Conversion Rate Optimisation, by setting up the goals (or conversions) you want to track for each test.
For instance, if your test involved changing the contact form, youโd want to track clicks on the submit button, clicks on each form field and visits to the thank you page URL. Thatโd give you a rough idea of how many people might be filling out your form.
But weโre not testing a form in this demo, weโre testing a random box in the bottom right corner of the screen.
So here we will instead track visits to other pages, clicks on the new element and clicks on any and all links on the website.
Track visits to all pages
Letโs start with the former. Edit the existing goal (VWO always provides one of these by default) to set it to track visits to all pages on the website.
You can do this by changing both the title and the URL set up in the URL matches box. For the former, click the pencil icon next to the title to add a box you can type in, then put in something a bit more meaningful, like: โwebsite visitsโ.
Then click the URL matches dropdown so it instead says URL contains, and enter your site domain in the box.
Thatโs it. Youโve now added a goal which tracks visits to other pages.
Next, add a new goal.
Track clicks on a specific element on the website
This time, donโt set it to track visits to a URL. Instead, set it to track clicks on an element, and set the element you want to track clicks on to โ.fixed-asideโ.
That way, itโll track how many times your new sidebar element was clicked on it. Itโs basically a lot like using document.querySelector for any JavaScript pros out there.
Finally, create a goal to track all clicks on links. You can do this by copying the format of the previous one, except with โ.fixed-asideโ switched out for just โaโ. Do this, and youโll have a goal which will track clicks on any link on the website.
Hereโs a the screenshot for reference, in case you need any more help setting up the tests:
So if youโre happy your test goals are set up the same way, do like on every other screen, and click the โNextโ button to move on.
5. How to distribute your traffic
This will then bring you to the final page. Here you can edit the test name again, if you wanted to. As well as make a few other useful changes to the test setup, like changing what percentage of users see the variation and what percentage see the control.
Weโll leave this at 50% for the control and 50% for the variation for the time being, you can also tick the box โDistribute Equallyโ here, but you may want to mess around with it at a later time nonetheless. Like say, whenever you feel like testing two or more variations instead of having a control.
You can also set up integrations between VWO and various third party tools here too. For instance, you can send the data to Google Analytics if your site uses that for tracking. Same with Google Tag Manager.
But thatโs a story for another article. Weโll explain how to properly integrate Google Analytics and VWO in a future tutorial instead.
For the time being though, just leave those boxes unchecked.
Do the same thing for the ones in the โAdvanced Optionsโ settings too. These are useful in certain situations, but theyโre again something for another tutorial, and not at all relevant to this demo campaign. Donโt change any of them from the default setup.
Click โNextโ once more to reach the final screen.
6. Finalising your A/B test Campaign
This is it. This is where you can choose whether to start the test immediately, or preview and start it later.
Youโre gonna want to do the latter. Starting the test right now wouldnโt be a good given our lack of browser testing, and a very good way to potentially break your website for anything more complex than an extra element or console statement.
Donโt push it live right away, set it to preview now and start later. Then test the site via the preview link and do a full QA of the A/B test. If you entered everything correctly, you should see the following upon doing so:
Congratulations, youโve now created your first ever A/B test in VWO. Hopefully you found it an interesting learning experience, and something thatโll lead to many CRO campaigns to come.
Thanks for reading!


