<%= @search_type %> Overview

<% @top_searches.each do |row| %> <% end %>
Top Searches <%= link_to "View all", searches_path(search_type: @search_type) %>
<%= row["normalized_query"] %> <%= row["searches_count"] %>
<% @bad_conversion_rate.each do |row| %> <% end %>
Low Conversions <%= link_to "View all", searches_path(search_type: @search_type, sort: "conversion_rate") %>
<%= row["normalized_query"] %> <%= number_to_percentage row["conversion_rate"], precision: 0 %>

Conversion Rate

<%= line_chart @conversion_rate_by_week %>

Volume

<%= line_chart [{name: "Searches", data: @searches_by_week}, {name: "Conversions", data: @conversions_by_week}] %>