Sha256: d4e29591385c835af1d0b119558ee9b4d32e13d883d1b850f488ecd7b349e213

Contents?: true

Size: 1.94 KB

Versions: 6

Compression:

Stored size: 1.94 KB

Contents

<% if results? %>
<%= cache current_exhibit, expires_in: 1.hour do %>
  <h2><%= I18n.t("spotlight.dashboards.analytics.reporting_period_heading") %></h2>
  <h3 class="h5 mt-4"><%= I18n.t("spotlight.dashboards.analytics.visitor_header") %></h3>
  <%= render Spotlight::Analytics::AggregationComponent.new(data: page_analytics.totals) %>

  <h3 class="h5 mt-4"><%= I18n.t("spotlight.dashboards.analytics.session_header") %></h3>
  <%= render Spotlight::Analytics::AggregationComponent.new(data: search_analytics.totals, exclude_fields: [:eventCount] ) %>

  <% unless page_analytics.rows.empty? %>
  <h3 class="h5 mt-4"><%= I18n.t("spotlight.dashboards.analytics.pages.header") %></h4>
  <table class="table table-striped popular-pages">
    <thead>
      <tr>
        <th><%= I18n.t("spotlight.dashboards.analytics.pagetitle") %></th>
        <th class="text-right text-end"><%= I18n.t("spotlight.dashboards.analytics.pageviews") %></th>
      </tr>
    </thead>
    <% page_analytics.rows.each do |p| %>
      <tr>
        <td><%= link_to p.pageTitle, p.pagePath %></td>
        <td class="text-right text-end"><%= p.screenPageViews %></td>
      </tr>
    <% end %>
  </table>
  <% end %>

  <% unless search_analytics.rows.empty? %>
  <h3 class="h5 mt-4"><%= I18n.t("spotlight.dashboards.analytics.searches.header") %></h4>
  <table class="table table-striped popular-pages">
    <thead>
      <tr>
        <th><%= I18n.t("spotlight.dashboards.analytics.searches.term") %></th>
        <th class="text-right text-end"><%= I18n.t("spotlight.dashboards.analytics.searches.views") %></th>
      </tr>
    </thead>
    <% search_analytics.rows.each do |p| %>
      <% if p.searchTerm.present? %>
        <tr>
          <td><%= p.searchTerm %></td>
          <td class="text-right text-end"><%= p.eventCount %></td>
        </tr>
      <% end %>
    <% end %>
  </table>
  <% end %>
<% end %>
<% else %>
  <%= I18n.t("spotlight.dashboards.analytics.no_results", pageurl: page_url) %>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
blacklight-spotlight-4.3.1 app/components/spotlight/analytics/dashboard_component.html.erb
blacklight-spotlight-4.3.0 app/components/spotlight/analytics/dashboard_component.html.erb
blacklight-spotlight-4.2.0 app/components/spotlight/analytics/dashboard_component.html.erb
blacklight-spotlight-4.1.2 app/components/spotlight/analytics/dashboard_component.html.erb
blacklight-spotlight-4.1.1 app/components/spotlight/analytics/dashboard_component.html.erb
blacklight-spotlight-4.1.0 app/components/spotlight/analytics/dashboard_component.html.erb