Banana Split
Banana Split is a simple lightweight split testing utility for Rails. It makes it extremely easy to tests different designs on your users:
<%= ab_test :buy_form, :colorful => 'shop/colorful_buy_form', :simplistic => 'shop/simplistic_buy_form' %>
Here, Bananasplit will render the shop/colorful_buy_form partial 50% of the times, and shop/simplistic_buy_form the other 50%. On the immediate action after purchase do like so to complete the goal:
def receipt
ab_goal :buy_form # whatever…
end
The ab_goal takes the value of the goal completion as a second argument - it defaults to 1.
Other examples
<%= submit_tag ab_test(:sign_up_button_text, {
:standard => { :text => 'Create user' },
:funky => { :text => 'Come on in!' }
}) %>
<%= submit_tag ab_test(:welcome_message, {
:simple => { :partial => 'welcome/simple_welcome_message', :locals => { :statistics => @statistics },
:complex => { :partial => 'welcome/complex_welcome_message', :locals => { :statistics => @statistics }
}) %>
Showing test results
Banana Split currently provides no ways of rendering the split test results but the included models makes it very easy to do so.
Installation
Add banana_split to your Gemfile:
gem 'banana_split'
And run the installer:
rails generate banana_split
… and you’re ready to go :)