{% extends 'layout.html.twig' %} {% block title %}Visitor Analytics{% endblock %} {% block body %}

Page Visit Analytics

Article Publish Activity

  • Last hour: {{ articlePublishStats.last_hour|number_format }}
  • Last 24 hours: {{ articlePublishStats.last_24_hours|number_format }}
  • Last 7 days: {{ articlePublishStats.last_7_days|number_format }}
  • Last 30 days: {{ articlePublishStats.last_30_days|number_format }}
  • All time: {{ articlePublishStats.all_time|number_format }}

Number of times articles were published via the API endpoint

Total Visits

  • Last 24 hours: {{ visitsLast24Hours }}
  • Last 7 days: {{ visitsLast7Days }}
  • All time: {{ totalVisits }}

Unique Visitors

  • Last 24 hours: {{ uniqueVisitorsLast24Hours }}
  • Last 7 days: {{ uniqueVisitorsLast7Days }}
  • All time: {{ totalUniqueVisitors }}

Tracked by session ID (includes both anonymous and logged-in visitors)

Unique Visitors Per Day (Last 7 Days)

{% for stat in dailyUniqueVisitorCountsLast7Days %} {% endfor %}
Date Unique Visitors
{{ stat.day }} {{ stat.count }}

Engagement

  • Avg. Visits/Session: {{ averageVisitsPerSession }}
  • Bounce Rate: {{ bounceRate }}%

Top 5 Visited Articles (Last 24 Hours)

{% if topArticlesLast24Hours|length > 0 %} {% for stat in topArticlesLast24Hours %} {% endfor %}
Article Path Visits
{{ stat.route }} {{ stat.count }}
{% else %}

No article visits recorded in the last 24 hours.

{% endif %}

Visits Per Day (Last 30 Days)

{% if dailyVisitCountsLast30Days|length > 0 %}
{% for stat in dailyVisitCountsLast30Days %} {% endfor %}
Date Visits
{{ stat.day|date('Y-m-d') }} {{ stat.count }}
{% else %}

No visit data for the last 30 days.

{% endif %}

Most Popular Routes (All Time)

{% if topRoutesAllTime|length > 0 %} {% for stat in topRoutesAllTime %} {% endfor %}
Route Visits
{{ stat.route }} {{ stat.count }}
{% else %}

No route data available.

{% endif %}

Recent Visits

{% if recentVisitRecords|length > 0 %} {% for visit in recentVisitRecords %} {% endfor %}
Route Session ID Visited At
{{ visit.route }} {{ visit.sessionId|slice(0, 12) }}... {{ visit.visitedAt|date('Y-m-d H:i') }}
{% else %}

No recent visits recorded.

{% endif %}

Visit Count by Route (Last 7 Days)

{% set filteredRouteVisitCounts = routeVisitCountsLast7Days|filter(stat => stat.count >= 5) %} {% if filteredRouteVisitCounts|length > 0 %} {% for stat in filteredRouteVisitCounts %} {% endfor %}
Route #
{{ stat.route }} {{ stat.count }}
{% else %}

No routes with 5 or more visits recorded in the last 7 days.

{% endif %}

Visitor Sessions (Last 7 Days)

{% if visitsBySessionLast7Days|length > 0 %} {% for stat in visitsBySessionLast7Days %} {% if stat.visitCount > 1 %} {% endif %} {% endfor %}
Session ID Visits First Visit Last Visit
{{ stat.sessionId|slice(0, 12) }}... {{ stat.visitCount }} {{ stat.firstVisit|date('M d, H:i') }} {{ stat.lastVisit|date('M d, H:i') }}
{% else %}

No visitor sessions recorded in the last 7 days.

{% endif %}

Visit tracking is automated via event listener. Session IDs track all unique visitors (both anonymous and logged-in) for accurate engagement analytics.

{% endblock %}