Create Simple A/B Tests In WordPress

02-19-2010 written by Travis Berry


One of the best things you can implement in your site right now is A/B testing.

According to good old Wikipedia, A/B testing is;

“A/B testing, split testing, or bucket testing is a method of marketing testing by which a baseline control sample is compared to a variety of single-variable test samples in order to improve response rates”

It’s a method to test different versions of things and compare their effectiveness against others.

In web design they are often used to test the effectiveness of converting users in some way. Whether it is selling them something, getting them to sign up for something, or just getting them to go to another page. As with all design there are a million ways to say or lay something out. A/B testing allows you to try multiple versions and find the one that works best for your goals.

So, setting up an A/B test isn’t all that hard. First thing to do is come up with your test materials. I would recommend starting with simple text changes to get the hang of A/B testing. For this example I’m going to create an author box that goes at the end of my posts.

Next figure out what your goal is. The easiest to use are pages you want the client to reach. These can be landing pages after someone fills out a form, or it can be the form page itself. I want people to end up on my contact page.

Now write several versions of your author text, with wording that encourages people clicking through to your contact page. Go a head and do it now, I’ll wait.

Ok, with all your text ready to go we can now start setting up the experiment. Go to www.google.com/websiteoptimizer and sign up for an account. I used my gmail account with all my other services attached to it to make things a little easier.

Once your all signed up you’ll end up at a page like this,

Here click the “Create another experiment” link near the top left. Yours may say “Create a new experiment” depending if you’ve ever done this before or not. As you can see in the pics, I’ve done this a few times already.

On the next page you can choose between an “A/B Experiment – The simplest way to start testing fast” or a “Multivariate Experiment – The most robust way to test lots of ideas“.

Choose “Multivariate Experiment – The most robust way to test lots of ideas“.

Check the box on the next page and click “create

Now we’re getting somewhere. Here name your experiment in the first text box. Name it something easy to remember and understand. I’m calling mine “contactbox2”

In the next box put the url of the page that the author box is going to be one. Mine is “http://www.travisberry.com/2010/02/10-easy-solutions-for-contact-forms/”

The box below is the url of the goal page. Mine is “http://www.travisberry.com/contact/”

Click “You will install and validate the JavaScript tags“ on the next page.

The next page will look like this

You can leave it alone for a second and instead open up a new tab. Download the Google Website Optimizer plugin from http://wordpress.org/extend/plugins/google-website-optimizer-for-wordpress/

Install and activate it in your WordPress install.

Hang in there, we’re getting closer.

Now, go and edit the post or page you listed as your starting point.

Notice there is now a new section added below the wysiwyg editor. Switch back to your google tab and copy the “Control Script”. Move back to your WordPress admin area and paste the code in the “Control Script” box. Repeat for the “Tracking Script”. DO NOT put the “Conversion Script” on this page.

Instead go to your goal page, contact in my case, and paste the “Conversion Script” code there. You don’t need to bother with the “Control” or “ Tracking Script” on this page,

Now go back and edit your post again. Scroll to where you want your author box to be in your post. Once there paste the code

<script>utmx_section("Insert your section name here")</script>

Followed by the text you want to use in you author box. Only put one version in at this point.

At the end of the text paste this

</noscript>

Now change the “Insert your section name here” to something easy to deal with.

Once you have everything in WordPress go back to the google tab.

Scroll to the bottom and click “Validate Pages”. If everything went well you should get confirmation and be allowed to click “Continue”.

This page is where we get to start adding the variations. Click “Add new variation” and enter in your second variation you wrote back in the beginning. Keep adding until you’ve added everything you wrote, then hit “Save and Continue

From here you can launch the experiment and watch as your traffic is split and analyzed. Results will take a while depending on your level of traffic, but expect to wait at least a day before you can see anything.

Well that about covers it. See I told you it was simple. A/B test can be used to learn some surprising things about the nature of your audience. If you have experience with A/B testing and want to share some results, post them in the comments.

I’m just a guy interested in all things design and web related. You should contact me about about this article, for freelance work, or for any reason.

5 Comments

  1. Murlu, February 20, 2010:

    This is a really fantastic guide.

    I’ve been wanting to do some A/B testing on my blog and also do a bit on my job’s website.

    I’ve been given permission to work on a few new templates and I’ve always wanted to be a bit more involved in the testing phase, really track the results so I can report back definitive answers.

    Bookmarked for reference :)

  2. Travis Berry, February 20, 2010:

    Thanks, I’m glad you found it useful.

  3. Rex Dixon, March 10, 2010:

    This has to be one of the most unique WP themes I’ve seen. Very colorful!

    Anyways, you have any A/B Tests you could share/upload on our site? You should follow us on Twitter @abtests (at least around middle of May – 5/17 to be exact) :)

  4. Travis Berry, March 10, 2010:

    Thanks, I’m glad you like the design of the site. I’m actually in the middle of running a test, when it’s done I’ll be sure to upload it to your site.

  5. Rex Dixon, March 17, 2010:

    @Travis Berry – Good deal, we will look forward to seeing your test results on A/B Tests soon!

6 Trackbacks/Pingbacks

  1. Pingback: [User Link:Create Simple A/B Tests In WordPress] | Tips for Designers and Developers | tripwire magazine on February 19, 2010
  2. Trackback: CSS Brigit | Create Simple A/B Tests In WordPress on February 22, 2010
  3. Pingback: 70+ Need to Check Out Posts for Designers and Developers | tripwire magazine on February 22, 2010
  4. Pingback: 70+ Need to Check Out Posts for Designers and Developers | LearnersTutorials on February 23, 2010
  5. Pingback: Very Useful 65 Wordpress Hacks | Design your way on March 8, 2010
  6. Pingback: Very Useful 65 Wordpress Hacks | Web Development News on March 12, 2010

Leave a comment


back to blog