1
0

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.

splitの使い方【A/Bテスト】

Posted at

LP作成ツールには様々なものがありますが、もしRailsを使用してLPを作成しているのであればsplitという便利なgemを使ってみましょう。

導入

splitを使用するためにはredisのインストールが必要です。

$ brew install redis
$ redis-server

split gemを入れます。

gemfile
gem 'split'

ABテスト結果ページのルートを指定します。

route.rb
mount Split::Dashboard, :at => 'split'

ABテストの箇所に以下のように文字を挿入します。

index.html.erb
<% ab_test('create_user', 'hoge', 'fuga') do |text| %>
  <%= link_to text, new_user_path %> 
<% end %>

テスト結果ページは/splitで見られます。

1
0
0

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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?