nick-b / seven_minute_abs forked from paulmars/seven_minute_abs
- Source
- Commits
- Network (4)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
commit ed3a3998d8aa47697799c401a3664d3a6456e000
tree 0814fb7676b272e9d59a31cb9fcc8c74191964c2
parent 16481d5ed22570e33518f5379f252009c9bb5a80
tree 0814fb7676b272e9d59a31cb9fcc8c74191964c2
parent 16481d5ed22570e33518f5379f252009c9bb5a80
| name | age | message | |
|---|---|---|---|
| |
README | Mon Mar 23 14:19:02 -0700 2009 | |
| |
Rakefile | Mon Sep 22 16:39:50 -0700 2008 | |
| |
generators/ | Thu Mar 19 16:21:33 -0700 2009 | |
| |
init.rb | Mon Sep 22 21:10:11 -0700 2008 | |
| |
install.rb | Mon Sep 22 20:58:47 -0700 2008 | |
| |
lib/ | Thu Mar 19 17:22:35 -0700 2009 | |
| |
tasks/ | Mon Sep 22 16:39:50 -0700 2008 | |
| |
test/ | Mon Sep 22 16:39:50 -0700 2008 | |
| |
uninstall.rb | Mon Sep 22 16:39:50 -0700 2008 |
README
SevenMinuteAbs
=======
Ab testing is 7 minutes. Not 6, not 5, 7!
Tested in rails 2.3.2
Installation
=======
go to your rails app directory
./script/plugin install git://github.com/paulmars/seven_minute_abs.git
Setup the database to store your info
=======
ruby script/generate ab_migration
rake db:migrate
Include Code
=======
add these lines to these files
module ApplicationHelper
include AbViewHelper
end
class ApplicationController < ActionController::Base
include SevenMinuteAbs
before_filter :ab_click_count
end
Use it!
=======
Test if orange or blue gets more clicks
"linkcolor" -> name of your test
2 -> number of different versions you have (else statement)
make sure to include 'test.stub' in any urls, otherwise clicks won't be counted!
<% ab_test("linkcolor", 2) do |test,version|%>
<% if version == 0 %>
<%= link_to "Blue version", url_for(:ab => test.stub), {:style => "color:blue"} %>
<% elsif version == 1 %>
<%= link_to "Orange version", url_for(:ab => test.stub), {:style => "color:orange"} %>
<% end %>
<% end %>
See Stats
=======
A quick way to see your stats. You want the highest % possible to be your main choice!
<% Ab.find(:all).each do |ab| %>
<div class="ab-result">
<pre>
name:<%= ab.testname %> v:<%= ab.version %> <%= ab.percent_clicked %>% <%= ab.display_count %> <%=
ab.click_count %> <%= ab.stub %> <%= ab.created_at %>
</pre>
</div>
<% end %>
Copyright (c) 2009 Paul McKellar, released under the MIT license
