Sha256: b9947a2a363526bdffe653df951560facb58cec1c668451225ff64481637276e

Contents?: true

Size: 1.8 KB

Versions: 2

Compression:

Stored size: 1.8 KB

Contents

<% experiments.each do |experiment| %>
  <h2>
    <%= experiment.name %>
    <% if experiment.active? && experiment.closed? %><small class="closed">Closed</small><% end %>
    <small><%= link_to "Details", experiment_path(experiment.id) %></small>
  </h2>

  <% if experiment.description %>
    <p class="description"><%= experiment.description %></p>
  <% end %>

  <% experiment.goals.each do |goal| %>
    <% results = experiment.results(goal: goal) %>

    <% if experiment.multiple_goals? %>
      <h3><%= goal.titleize %></h3>
    <% end %>

    <table>
      <thead>
        <tr>
          <th>Variant</th>
          <th class="width-20">Participants</th>
          <th class="width-20">Conversions</th>
          <th class="width-20">Conversion Rate</th>
          <th class="width-20">Prob Winning</th>
        </tr>
      </thead>
      <tbody>
        <% results.each do |variant, result| %>
          <tr>
            <td>
              <%= variant %>
              <% if variant == experiment.winner %>
                <span class="check">✓</span>
              <% end %>
            </td>
            <td><%= result[:participated] %></td>
            <td><%= result[:converted] %></td>
            <td>
              <% if result[:conversion_rate] %>
                <%= (100.0 * result[:conversion_rate]).round(FieldTest.precision) %>%
              <% else %>
                -
              <% end %>
            </td>
            <td>
              <% if result[:prob_winning] %>
                <% if result[:prob_winning] < 0.01 %>
                  &lt; 1%
                <% else %>
                  <%= (100.0 * result[:prob_winning]).round(FieldTest.precision) %>%
                <% end %>
              <% end %>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>
  <% end %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
field_test-0.7.0 app/views/field_test/experiments/_experiments.html.erb
field_test-0.6.1 app/views/field_test/experiments/_experiments.html.erb