{% extends "admin/base.html" %} {% block title %}Analytics{% endblock %} {% block content %}

Analytics

{% if not has_data %}

No analytics data yet

Analytics data will appear here as visitors browse your site. Check back after some traffic.

{% else %}
{% include "htmx/analytics_realtime.html" %}
{{ summary.total_pageviews | default(value=0) }}
Pageviews
{% if summary.pageviews_change %}
{% if summary.pageviews_change > 0 %}+{% endif %}{{ summary.pageviews_change | round(precision=1) }}%
{% endif %}
{{ summary.unique_sessions | default(value=0) }}
Unique Visitors
{% if summary.sessions_change %}
{% if summary.sessions_change > 0 %}+{% endif %}{{ summary.sessions_change | round(precision=1) }}%
{% endif %}
{{ summary.avg_response_time_ms | default(value=0) }}ms
Avg Response
{{ summary.error_rate | default(value=0) | round(precision=2) }}%
Error Rate
{% if summary.pageviews_over_time | length > 0 %}

Pageviews Over Time

Daily Views {{ summary.total_pageviews }} total
{{ summary.pageviews_max }} {{ summary.pageviews_max / 2 | round }} 0
{% for point in summary.pageviews_over_time %}
{{ point.value }}
{{ point.timestamp | str_slice(start=5, end=10) }}
{% endfor %}
{% endif %}

Top Pages

{% if summary.top_pages | length > 0 %}
{% for page in summary.top_pages %} {% endfor %}
Page Views Visitors
{{ page.path | truncate(length=40) }} {{ page.pageviews }} {{ page.unique_sessions }}
{% else %}

No page data available

{% endif %}

Traffic Sources

{% if summary.top_referrers | length > 0 %}
{% for ref in summary.top_referrers %} {% endfor %}
Source Visitors %
{{ ref.domain }} {{ ref.sessions }} {{ ref.percentage | round(precision=1) }}%
{% else %}

No referrer data (direct traffic only)

{% endif %}

Countries

{% if summary.countries | length > 0 %}
{% for country in summary.countries %}
{{ country.code }}
{{ country.name }} {{ country.sessions }}
{% endfor %}
{% else %}

No country data available

{% endif %}

Devices

{% if summary.devices %}
{% for device, count in summary.devices %}
{% if device == "desktop" %} {% elif device == "mobile" %} {% else %} {% endif %}
{{ device | capitalize }} {{ count }}
{% endfor %}
{% else %}

No device data available

{% endif %}

Browsers

{% if summary.browsers %}
{% for browser, count in summary.browsers %}
{{ browser }} {{ count }}
{% endfor %}
{% else %}

No browser data available

{% endif %}

Loading content performance...

{% endif %}
{% endblock %}