burguillos.info/templates/metrics/stats.html.ep

62 lines
2.2 KiB
Plaintext

% layout 'stats';
% my $base_url = config 'base_url';
<div class="description">
<h2>Stats</h2>
<p>Non-Unique visitors last 24 hours <%=$tracking_data->{unique_ips_last_24_hours}%></p>
<p>Non-Unique visitors last week <%=$tracking_data->{unique_ips_last_week}%></p>
<p>Non-Unique visitors last month <%=$tracking_data->{unique_ips_last_month}%></p>
<p><a href="<%=$base_url.'/stats?filter=remove-extensions'%>">Ver datos sin extensiones.</a></p>
<p><a href="<%=$base_url.'/stats'%>">Ver todo.</a></p>
<table>
<tr>
<th>Path</th>
<th data-sort-method="number">Visitors 1h</th>
<th data-sort-method="number">Visitors 3h</th>
<th data-sort-method="number">Visitors 6h</th>
<th data-sort-method="number">Visitors 12h</th>
<th data-sort-method="number">Visitors 24h</th>
<th data-sort-method="number">Visitors week</th>
<th data-sort-method="number">Visitors month</th>
</tr>
% for my $row (@$tracking_by_url) {
<tr>
<td><%="${base_url}$row->{path}"%></td>
<td><%=$row->{unique_ips_last_1_hour}%></td>
<td><%=$row->{unique_ips_last_3_hours}%></td>
<td><%=$row->{unique_ips_last_6_hours}%></td>
<td><%=$row->{unique_ips_last_12_hours}%></td>
<td><%=$row->{unique_ips_last_24_hours}%></td>
<td><%=$row->{unique_ips_last_week}%></td>
<td><%=$row->{unique_ips_last_month}%></td>
</tr>
%}
</table>
<h3>Google data.</h3>
<table>
<tr>
<th>Path</th>
<th data-sort-method="number">Visitors 1h</th>
<th data-sort-method="number">Visitors 3h</th>
<th data-sort-method="number">Visitors 6h</th>
<th data-sort-method="number">Visitors 12h</th>
<th data-sort-method="number">Visitors 24h</th>
<th data-sort-method="number">Visitors week</th>
<th data-sort-method="number">Visitors month</th>
</tr>
% for my $row (@$google_data) {
<tr>
<td><%="${base_url}$row->{path}"%></td>
<td><%=$row->{unique_ips_last_1_hour}%></td>
<td><%=$row->{unique_ips_last_3_hours}%></td>
<td><%=$row->{unique_ips_last_6_hours}%></td>
<td><%=$row->{unique_ips_last_12_hours}%></td>
<td><%=$row->{unique_ips_last_24_hours}%></td>
<td><%=$row->{unique_ips_last_week}%></td>
<td><%=$row->{unique_ips_last_month}%></td>
</tr>
%}
</table>
</div>