An Introduction to Split Testing in WordPress

An Introduction to Split Testing in WordPress

Tutorial Details
  • Program: WordPress, Google Website Optimizer Plugin for WordPress
  • Version: 2.8+
  • Difficulty: Easy
  • Estimated Completion Time: 30 mins

Split testing is a way to experiment with a live site and find which headlines and text are the most effective. Amazon uses split testing to determine which versions of their site convert customers better. We’ll use WordPress and Google’s Website Optimizer to test two different headlines, and find which works best at capturing customer emails.

Tutorial now on Wptuts+

Step 1: Decide on Your Experiment Type

First, we’ll need to decide what sort of an experiment we’d like to run. In Google’s Website Optimizer, we have two choices: Multivariate Testing or A/B Testing.

Multivariate testing is a good way to test a lot of things at once. Big online stores use multivariate testing to figure out which layouts and ad copies work best. For the purpose of this tutorial, however, we’ll use A/B testing.

A/B Testing is a way to test two different types of copy, and see which works best. We start with two different variations of the same page, send some traffic to the pages, and see which converts best statistically. For the purposes of our split test, we’ll want to have at least 100 conversions before deciding which page is the statistically significant winner.


Step 2: Design Your Experiment Flow

In order to have a successful experiment, we’ll need to decide first what page we’d like to test. It’s important that your page have a goal you’d like your user to accomplish. For this page, we want our user to click and sign up for their free eBook. When our user opens their email and confirms their subscription, they’ll be taken to our goal page.

Important: Change One Thing At a Time

For our purposes, we’re only going to change the headline at the top of the page. It’s important to keep the rest of the page the same, so we have a control. This ensures that our changes are responsible for the improvements. We know exactly what’s working, and we keep improving, always testing one thing at a time.


Step 3: Design the Test Page

Log into WordPress, and create a new page. Copy and paste the same text from your inital page, but change the headline. Click “Publish,” and make sure your page is exactly the same, except for your new header text:

In our case, we’re using the headings “Don’t Be a Hacker’s Next Statistic!” and “Protect Yourself Online.”

You’ll need to make a note of the URLs for the two test pages. We’ll need those to set up the experiment in Google’s Website Optimizer.


Step 3: Design the Goal Page

Our goal page will be hidden from the rest of the site. It will only be accessible after our customer signs up for the free eBook.

You’ll notice that all our pages have hidden the WordPress header and footer. You can do this to WordPress pages with a custom page template.


Step 4: Install the Google Website Optimizer Plugin

The Google Website Optimizer Plugin allows us to install the special JavaScript code that Google will give us. This code gives users one random page at a time, and tests to see whether or not they reach our goal page.

Installing the Google Website Optimizer Plugin is easy enough in WordPress 2.8+: log in to your Admin console, click the Plugin drop down, and click Add New.

Search for Google Website Optimizer. Our plugin is called, “Google Website Optimizer Plugin for WordPress.” Click “Install” to the right of the plugin in the drop down.

This plugin ads the following form to all your WordPress pages:


Step 5: Set Up the Optimizer Experiment

You’ll need to set up a Google Account if you don’t already have one. Then, go to Google’s Website Optimizer and log in. You’ll be presented with two options:

Obviously, for our purposes, we’ll be choosing the A/B Experiment, to try our two different page headlines out for effectiveness. So, click A/B and continue.

On the next page, Google will ask you if you’ve prepared for the experiment. Check “I’ve completed the steps above.” at the bottom of the page and then click “Create” to continue.

Now, we’ll pick a name for our experiment, and let Google know which pages we’ll be testing. Look at the image below to see how our campaign is set up. Notice Google checks to make sure our pages exist and are currently viewable.

Click continue when you’ve verified your pages, and Google has acknowledged that they can reach the pages.


Step 6: Install Your Optimizer Code

On the next page, Google will give you the code necessary to embed in your pages. First, open up your WordPress control panel and navigate to the first page you made.

Check the box to enable Google Website Optimizer, and insert the first (Control Script) and second (Tracking Script) pieces of code Google gave you for your experiment.

Save your post, and open up your second page. Insert only the second piece of code (the Tracking Script), as below:

Save this one too, and finally, open up your Goal page, and insert one the final Conversion script:

Publish this page, and make sure Google is reading the Website Optimizer Code. Congratulations, you are now running your first A/B Test!


Step 6: Run Your Experiment, Check Results, Keep Experimenting!

Your experiment will now run, and Google will let you know when one of your pages is a clear winner. It’s important you let the experiment run for at least 100 conversions, because your test must be statistically significant. Again, Google will let you know when you have a clear winner.

You’ve run your first scientific test using Google Website Optimizer. Now take your clear winner, and keep improving all your sales pages. The more you measure, the more you can improve. Good luck!

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://www.iguoguo.net iguoguo

    Very good.
    It is very useful for me,and I want to try it tommorrow.

  • http://twitter.com/webjohan webjohan

    Isn’t this also called A/B-testing?
    Nice one!

    • http://twitter.com/webjohan webjohan

      d0h! Sorry

  • http://www.reedge.com Dennis van der Heijden

    Nice setup I thing http://www.reedge.com should have a wordpress plugin since it makes it super easy. No code pasting and still a/b and multivariate testing.

  • http://nmecdesign.com Jonathan Warren

    I’m sure some bright spark could knock up a standalone wordpress plugin for split testing without the need for Google

  • http://www.siamcomm.com Eric Buckley

    This was a good overview.

    However, it assumes that a user is very well adept at various WordPress hacks and features and brings to light a few additional questions:

    What process is used to publish pages when using a normal WordPress home page?
    How do you hide the different published pages on the menu?
    Why was this done using WordPress 2.8?
    Wouldn’t WP 3.0+ have made more sense given the Menu customization features?
    If using different Page Templates, why not use differing Footer registration files to implement the varied Google scripts?

    A bit more granularity would really be beneficial to the newbie community.

    Cheers,
    E.

    • Jamal Mohamed

      I think he said WordPress 2.8+ meaning WP2.8 and up.

  • http://laroouse.com edurup

    very nice post thanks a lot

  • http://www.linkbuildingservices.com/ harly

    So you want to build your website with with WordPress rather than a static HTML page, but you also want the benefits of being able to split test your copy and use it with Google Website Optimizer.You have done a great job.

  • http://www.aediscreative.com Christopher

    Fantastic. I was just looking up this topic yesterday. How extraordinarily timely.. :)

  • http://www.ipad-gear.dk/ Robert

    Good coverage on the basics.

    But – how should it be done if one wants to test two kinds of a more overall layout, ie. two different colors in the navigation bar, stuff in the sidebar etc. and not just two kinds of pages.

    Robert

    • http://migshouse.com miguel hernandez

      Hello Robert,

      You’d actually do the same thing but break it out by the regions/content/areas/colors you’d like to compare/contrast.

    • Jamal Mohamed

      I guess you can throw together a plugin to achieave such thing, and then break it out by the regions/content/areas/colors you’d like to compare/contrast as Miguel said.

  • http://www.websitedesigncostablanca.com paul alexander

    Useful and informative!

  • http://migshouse.com miguel hernandez

    The correct term is actually “A/B Testing” not split testing. Good to see an article discuss testing practices in the bling bling that is web 2.0. Very useful & timely.

  • http://migshouse.com miguel hernandez

    I’m surprised that WP doesn’t have something built-in for this. In Drupal, this is already the case. There’s a SimpleTest module (plugin) that you can use on any site. In the shortly upcoming Drupal 7 (which is gonna rock!), this module will be included in D7 Core & will be named the “Testing” module when you look up your modules page.

    I gave a presentation on this that’s very introductory at an Los Angeles (LA) Drupal user group meeting & presented on the topic @DrupalCamp LA. You can see my slides, which are very newbie-friendly, at my personal site:
    http://migshouse.com/content/simpletest-drupal-7-you

    There’s a part 2 that’ll be coming soon, so if you’re interested, stay tuned. I hope it helps demystify testing complex, interactive websites.

    Miguel Hernandez
    LA Drupal Co-Organizer
    DrupalCamp LA Co-Organizer

  • http://www.thedevelopertuts.com thedevelopertuts

    Great tutorial, although a bit much for a simple A/B testing.

  • http://www.giulianoliker.com Giuliano

    This is very informative article. Thanks Kirk! I would definitely try this on client’s registration form.

  • http://www.maiswebhosting.com maisWebHosting

    Off course this plugin for WordPress is gonna be a good help in my next projects to make my ROI go crazy. Let’s see how well i’m gonna do!

  • http://www.reedge.com Dennis van der Heijden

    I wonder how difficult it would be to make plug-in like this for Reedge.com?

    We have one (same) code for footer and header and one user dependent number in the header code. I guess some sort of plugin that installs this code in wpheader and wpfooter plus get the right code from the Reedge Project settings will do.

    With a plugin like this I think we would help a lot of people in some advanced testing using our simple interface. Would WP people like that you think?

  • http://www.fitness-n-wealth.com/ Affiliates Marketing

    These smart super affiliate “snipers” have less sites that make MUCH MORE money and are much easier and cost efficient to manage. They are in the trenches making the BIG BUCKS and could care less about writing a affiliate ebook to tell you how they do it. The super affiliate handbook providing online affiliate marketing.

  • http://www.webdevelopmentcompany.com Gus

    Great stuff. Thanks for the tips.

  • http://bcic.com.vn Xay Dung

    Very informative post! thanks !
    I like Google Website Optimizer Plugin.

  • http://www.styleblueprint.com Jay Graves

    Is this v1.3 of the plugin. Does it work on 3.x? Thanks in advance, Jay

  • http://www.paylessbuckles.com/ Wholesale Belt Buckles

    hi this is really good information given step by step plugin in WordPress.

    We offers wholesale belt buckles, western, belt, batman, superman and also rhinestone, skull

    belt buckles, visit our belt buckle store and leather belts also wholesale buckles.

    http://www.paylessbuckles.com/

    Thanks :)

  • http://www.gurutechnoworld.com/cms_application_services_chandigarh_india.aspx CMS Applications

    this is very useful to me .now i really gonna start this from tommarow.

    Content Management System (CMS) covers the complete life cycle of your site, right from the creation through the organization, division, to publishing the information. CMS from Guru Techno World offers you the added advantages to manage the structure of the site, improve the appearance of the existing pages and navigation of the users with the help of our custom CMS Application Development Company Chandigarh India.

    http://www.gurutechnoworld.com/cms_application_services_chandigarh_india.aspx

    thanks

    • http://www.thewinnipegpainters.com/ winnipeg painters

      this information was really beneficial for me.

      thanks

  • http://www.thewinnipegpainters.com/ winnipeg painters

    Hi
    I found this site through search engines.
    – Very interesting and useful topic.
    This plugin in WordPress is really beneficial, I will try this. This will help me a lots.

    The Winnipeg Painters – The Best House Painting Contractors In MB – We offer complete interior painting and exterior painting services for both residential and commercial locations. House painters Winnipeg, MB / Manitoba are the best.

    http://www.thewinnipegpainters.com/

    THANKS

  • aqoon

    Hi Jeffrey; Thank you for the “Creating Custom Options Pages in WordPress” tutorial that you have posted at Sitepoint. ( http://vimeo.com/14470991). In the video you have mentioned that you were thinking to add JAVA to animate the Option Panel. Sooner would have been much appreciated. Thank you.

  • http://www.freeforeclosureinvestingcourses.com/ Free foreclosure investing courses

    Hi
    Thanks for the wonderful post. I need to plug in to wordpress. I like this as it helped me a lot and sorted my problem. I appreciate the work.Enjoyed it.

    The Best FREE Foreclosure Investing Courses And Information Online. FREE Information On Foreclosure

    Investing And Short Sale Deals.
    http://www.freeforeclosureinvestingcourses.com/

    Thanks

  • http://wordpress-tech.info wordpress Guru

    Too complex for me!

    I appreciate your afforts!

  • http://bloggerkhan.com Najee

    Is there a way to split test A/B a single WordPress post. You write two different sets of text but they appear alternatingly on the same post. Traffic goes to the same page with the same Title/Headline but the post body text alternates. Both body texts would have a sign up link with a unique code and over time we will know which body text converts better.

    Same post, alternating text.

    Any ideas?

  • http://www.effortlessinternetmarketing.com Carol

    Thanks for the post. Very useful and easy to implement for simple themes.

    I’d be interested to know how to split test the feature area on a theme like Optimize from WooThemes where there is no dedicated home page as it seems to be made up up of lots of other pages.

    My work around was to install the theme twice on a yourdomain.com and yourdomain.com/home and put a redirect on the page links to the main site but when i used website optimizer the links kept defaulting back to the home page.

  • http://www.wpcashplus.com/ Scott

    We just released a WordPress plugin that is a simpler alternative to Google Optimizer that allows you to run split tests inside of WordPress using shortcodes. Would love additional feedback on it and any suggestions on more advanced features.

    WP Cash+ Automatic Split Testing WordPress Plugin
    http://www.wpcashplus.com

    Thanks!
    Scott

  • http://www.allaboutthephilippines.com/ Louie

    Hello,

    Interesting stuff!

    I have a question, is it possible to have 2 conversion pages?

    I have 2 variations:

    http://www.domain.com/squeeze1
    ww.domain.com/squueze2

    squueze1 has an optin form in the sidebar and has a thank you page after op-tining while the squeeze2 has the facebook aps image in the sidebar and once clicked, the viewer will be redirected to the facebook permission page.

    I am confused what conversion page to use. My main purpose is to test which one works better, whether the viewer will click the facebook apps or subscribe to the optin form.

    Please help me on this..

  • http://itconsultancyservices.com It Manged Services

    Thank you so much for this clear and detailed explanation – it worked like a charm

  • http://VitalWills.com Will Writer JW

    Interesting way to test. I wonder if there is a way to test the homepage like someone mentioned as well.

  • http://www.sanovnikopedija.com/ sanovnik

    Very interesting testing, i’m so suprised with results. Thanks a lot for sharing!

  • http://lassebunk.dk Lasse Bunk

    I have also created a plugin that allows you to A/B and split test your WordPress site’s content (posts, pages, and widgets), stylesheets, javascripts, and themes.

    Check it out: http://lassebunk.dk/plugins/abtest/

    /Lasse

  • http://www.split-dalmatien.de toni

    thank you for the great turorial.
    I will use it, to test different AdSense Places!

  • http://www.baristamanual.com Book about Coffee

    I haven’t yet had a look at wether or not the google website optimiser app on wordpress is the only app capable of of integrating an A/B Split test. Surely there’s an app for worpress that installs the code for you also. Would anyone recommend any other app?

    • http://baristamanual.com book about coffee

      Lasse,
      My apologies i missed your post, just surfing to your site to check out the plugin now.

  • http://ez-biz.com Online Businsess Tips

    Thanks for the great information, I need to do some split testing and this was just what I was looking for!

    Ken