Skip to content

Very simple ABTest functionality for Ruby, based in ActiveRecord and with Rails 3 generators

License

Notifications You must be signed in to change notification settings

fguillen/GuineaPig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GuineaPig

Very simple ABTest functionality for Ruby, based in ActiveRecord and with Rails 3 generators

Installation

Add this line to your application's Gemfile:

gem "guinea_pig"

Usage

Configure the experiments

# config/ab_experiments.yml
experiment_monkey:
  - "alternative_monkey_1"
  - "alternative_monkey_2"

experiment_elefant:
  - "alternative_elefant_1"
  - "alternative_elefant_2"
  - "alternative_elefant_3"

Create the table

rails generate guinea_pig:migration
rake db:migrate

Experiment!

LandingPage experiment

redirect_to GuineaPig.alternative(:experiment_monkey, user)

CSS experiment

<%= stylesheet_link_tag "/assets/css/#{GuineaPig.alternative(:experiment_monkey, user)}.css" %>

Convert!

if user.has_bought_something?
  GuineaPig.conversion(:experiment_monkey, user)
end

Sate of the art

Beta version but already used in production environments

About

Very simple ABTest functionality for Ruby, based in ActiveRecord and with Rails 3 generators

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages