11
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

多変量テストのための gem を開発中

Last updated at Posted at 2012-12-26

複数のABテストを同時に行う多変量テストを hacker-friendly な記法で簡単に実装できる gem を開発中。
下記のように記述できる。

home/index.html.erb
...

<div class="landing-image">
  <% # The first test %>
  <%= select_variation(:landing_page, :btn_color, "red_btn", "green_btn", "blue_btn") do |alt| %>
    <% # alt will be "red", "green" or "blue" %>
    <%= link_to next_page_path, "Next", :class => alt %>
  <% end %>
</div>

...

<div class="content">
  ...

  <% # And the second one. You can also change what template is rendered by doing like this. %>
  <%= select_variation(:landing_page, :explanation, "alts/explain1", "alts/explain2") do |alt| %>
      <%= render :partial => alt %>
  <% end %>
  ...

  <% # You can put as many ab tests as you want in one page! %>
  <%= link_to select_variation(:landing_page, :signup, "Learn more", "Sign up"), signup_path %>
  <% # This is the same as the code below. %>
  <% # select_variation(:landing_page, :signup, "Learn more", "Sign up") do |alt| %>
    <% # link_to alt, signup_path %>
  <% # end %>
  ...

</div>

...

管理画面のスクリーンショット

admin interface of rightchoice

11
12
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?