<% if note %>

<%= note %>

<% end %> <%= form_with url: helpers.analytics_exhibit_dashboard_path(current_exhibit), class: 'mb-3 d-flex', method: :get do |form| %>
<%= form.label :start_date, I18n.t("spotlight.dashboards.analytics.start_date_label") %> <%= form.date_field :start_date, value: dates['start_date'], min: min_date, max: max_date %> <%= form.label :end_date, I18n.t("spotlight.dashboards.analytics.end_date_label"), class: 'ml-2 ms-2' %> <%= form.date_field :end_date, value: dates['end_date'], min: min_date, max: max_date %>
<%= form.submit I18n.t("spotlight.dashboards.analytics.submit_date_label"), class: 'btn btn-primary' %>
<% end %> <% if results? %>

<%= heading %>

<%= I18n.t("spotlight.dashboards.analytics.visitor_header") %>

<%= render Spotlight::Analytics::AggregationComponent.new(data: page_analytics.totals) %>

<%= I18n.t("spotlight.dashboards.analytics.session_header") %>

<%= render Spotlight::Analytics::AggregationComponent.new(data: search_analytics.totals, exclude_fields: [:eventCount] ) %> <% unless page_analytics.rows.empty? %>

<%= I18n.t("spotlight.dashboards.analytics.pages.header") %>

<% page_analytics.rows.each do |p| %> <% end %> <% end %> <% unless search_analytics.rows.empty? %>

<%= I18n.t("spotlight.dashboards.analytics.searches.header") %>

<% search_analytics.rows.each do |p| %> <% if p.searchTerm.present? %> <% end %> <% end %> <% end %> <% else %>

<%= I18n.t("spotlight.dashboards.analytics.no_results", pageurl: page_url) %>

<% end %>