Sha256: 904e1a54a21ef4ad841e9aacc05450c5703d25d0983bc2bf3bcb5efd1049089c

Contents?: true

Size: 971 Bytes

Versions: 1

Compression:

Stored size: 971 Bytes

Contents

<%
  settings = AbExperimentsRails::Settings.new({
    test_name: :landing_page_test, # your choice
    experiment_id: 'EXPERIMENT_ID', # copy/paste from google ab experiments
    experiment_enabled: true, # on/off your experiment. display only original content when false
    spinner_starts_after: 1, # spinner loader start after 1s
    spinner_max_time: 5 # show original content after 5s seconds if javascript fails
  })
%>

<%= render "ab_experiments_rails/loading" if settings.experiment_enabled? %>
<div class="<%= "#{settings.original_class}" %> google_ab_show_later">
  <h1>Welcome and buy our services</h1>
  <button>
    Registration...
  </button>
</div>
<% if settings.experiment_enabled? %>
  <div class="<%= "#{settings.variant_class} "%> google_ab_hidden">
    <h1>Welcome and buy our services for half prices</h1>
    <button>
      Registration...
    </button>
  </div>
  <%= render "ab_experiments_rails/header_content", settings: settings %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ab-experiments-rails-0.0.3 test/dummy/app/views/pages/landing_page.html.erb