Usage Instructions

Using the A/B testing plugin is very straightforward.

Before you begin

You need somewhere to collect the data:

And you need a copy of the plugin script.

For a Instabir.com Subscription use: jquery.ab.hosted.min.js (compressed) or jquery.ab.hosted.js (development)
Running your own server use: jquery.ab.min.js (compressed) or jquery.ab.js (development)

Now, configure the HTML

<!--Add jQuery and Plugin -->
<script type='text/javascript' src='jquery.min.js'>
<script type='text/javascript' src='jquery.ab.min.js'>

<!--Testing which text provides more sign ups -->
<span id='SignUp_Now'>Sign Up Now</span>
<span style='display: none;' id='Register_Now'>Register Now</span>
<!-- Hide one element in case the client does not have js -->



<a href="page.html">Go</a>

The test is configured in HTML

  • All of the potential options are defined in the HTML source.
  • The plugin will randomly select one of the options to present to the user.
  • The other options will be removed from the site’s DOM.
  • Use any number of elements and any combination of element types.
  • The ID of the element is used as the ‘name’ of the option.

You will also need an Action Element.

  • This will be an element that is clicked to measure conversion rates.
  • In this example, it is the “Go” link.
  • Any element can be the Action Element
  • Any event (click, keypress, hover, etc) can be bound to the Action Element

Check out the Demos Page for more examples.

Then, run the Javascript

(function(){
  $(document).ready({
    $('span').ab({
      testname: 'Sign-Up Text',
      action_el: $('a')
    });
  });
})(jQuery)

Required Parameters:

  • ‘testname’: friendly name for this particular test. To create a new test- just run the plugin with a new test name.
  • ‘action_el’: a jQuery element or a set of elements that you wish you bind the test event.

Optional Parameters

  • ‘action_ev’: the event to bind the test to (default: ‘click’)

All Done!

You are now collecting data!

But wait? How do I view the results of my test?

If you have a Instabir.com Subscription, Login and click the “View Results” link in the top menu.

If you run your own server, results will be stored in your local database.