· 1 min read
Screencast: A/B Tests mit A/Bingo
Download:
Download(35.1 MB, 11:04) Alternativer Downloadfür iPod & Apple TV(27.6 MB, 11:04)
Resourcen:
Quellcode:
[bash] script/plugin install git://git.bingocardcreator.com/abingo.git script/generate abingo_migration rake db:migrate script/generate controller abingo_dashboard script/plugin install —force git://github.com/ryanb/abingo.git [/bash]
[ruby] # users_controller.rb bingo! “signup_intro” bingo! “signup_title” # or bingo! “signup”
# application_controller.rb before_filter :set_abingo_identity
private
def set_abingo_identity if request.user_agent =~ /b(Baidu|Gigabot|Googlebot|libwww-perl|lwp-trivial|msnbot|SiteUptime|Slurp|WordPress|ZIBB|ZyBorg)b/i Abingo.identity = “robot” elsif current_user Abingo.identity = current_user.id else session[:abingo_identity] ||= rand(10 ** 10) Abingo.identity = session[:abingo_identity] end end
# abingo_dashboard_controller.rb class AbingoDashboardController < ApplicationController # TODO add some authorization include Abingo::Controller::Dashboard end
# routes.rb map.abingo_dashboard “/abingo/:action/:id”, :controller=> :abingo_dashboard [/ruby]
[html] <% ab_test(“signup_title”, [“Sign up”, “Registration”, “Free Sign up”], :conversion => “signup”) do |signup_title| %> <% title “Free Sign up” %> <% end %>
<% if ab_test “signup_intro”, nil, :conversion => “signup” %>
…
<% end %> [/html]