← <%= t('nav.admin') %>

<%= t('astat.title') %>

<%= t('astat.intro') %>

<% var s = stats; var _max = Math.max(1, ...s.series.map(function(d){ return d.pageviews; })); %>
<%= s.totals.visitors %>
<%= t('astat.visitor_days', { n: s.days }) %>
<%= s.totals.pageviews %>
<%= t('astat.pageviews_days', { n: s.days }) %>
<%= s.totals.plays %>
<%= t('astat.plays_total') %>
<%= s.totals.postViews %>
<%= t('astat.postviews_total') %>
<% if (typeof s.allTime !== 'undefined') { %>

<%= t('astat.alltime_pre') %> <%= s.allTime.pageviews %> <%= t('astat.alltime_mid') %> ยท <%= s.allTime.visitorDays %> <%= t('astat.alltime_post') %>

<% } %>
<%= t('astat.help_summary') %>
<%= t('astat.help_vd_term') %>
<%= t('astat.help_vd_a') %> <%= t('astat.help_vd_em') %><%= t('astat.help_vd_b') %>
<%= t('astat.help_pv_term') %>
<%= t('astat.help_pv') %>
<%= t('astat.help_plays_term') %>
<%= t('astat.help_plays') %>
<%= t('astat.help_postviews_term') %>
<%= t('astat.help_postviews') %>

<%= t('astat.help_footer') %>

<%= t('astat.period') %> <% [7,14,30,90].forEach(function(n){ %> <%= n %>d <% }); %>

<%= t('astat.last_n_days', { n: s.days }) %>

<%= t('astat.lg_visitor_days') %> <%= t('astat.lg_pageviews') %>
<% var _step = s.days <= 14 ? 1 : (s.days <= 31 ? 4 : 10); s.series.forEach(function(d, i){ var pvPct = Math.round(d.pageviews / _max * 100); var visPct = Math.round(d.visitors / _max * 100); %>
<%= (i % _step === 0) ? d.day.slice(8) : '' %>
<% }); %>

<%= t('astat.top_posts') %>

<% if (!s.topPosts.length || s.topPosts[0].views === 0) { %>

<%= t('astat.no_views') %>

<% } else { %>
    <% s.topPosts.forEach(function(p){ %>
  1. <%= p.title %><%= p.views %>
  2. <% }); %>
<% } %>

<%= t('astat.most_played') %>

<% if (!s.topTracks.length || s.topTracks[0].plays === 0) { %>

<%= t('astat.no_plays') %>

<% } else { %>
    <% s.topTracks.forEach(function(t){ %>
  1. <%= t.title %><%= t.plays %>
  2. <% }); %>
<% } %>
<% if (typeof s.referrers !== 'undefined' && s.referrers.length) { %>

๐ŸŒ <%= t('astat.sources') %>

    <% s.referrers.forEach(function(r){ %>
  1. <%= r.host %><%= r.n %>
  2. <% }); %>
<% } %> <% if (typeof linkClicks !== 'undefined' && linkClicks.length) { %>

๐Ÿ”— <%= t('astat.linkbio_clicks') %>

    <% linkClicks.forEach(function(l){ %>
  1. <%= l.url.replace(/^https?:\/\//,'').slice(0,48) %><%= l.clicks %>
  2. <% }); %>
<% } %>