{% extends "base_authenticated.html" %} {% block title %}QR Code Statistics - QR Code Management{% endblock %} {% block extra_head %} {% endblock %} {% block content %}

QR Code Analytics

Comprehensive insights into QR code usage, devices, locations, and user behavior

Filter Analytics

Clear Filters

Overview Statistics

{{ "{:,}".format(general_stats.total_scans) }}

Total Scans

{{ general_stats.today_scans }} today

{{ "{:,}".format(general_stats.unique_users) }}

Unique Users

Across {{ general_stats.active_days }} days

{{ general_stats.active_qr_codes }}

Active QR Codes

Currently in use

{{ "{:.1f}".format((general_stats.gps_enabled_scans / general_stats.total_scans * 100) if general_stats.total_scans > 0 else 0) }}%

GPS Usage

{{ "{:,}".format(general_stats.gps_enabled_scans) }} with location

Analytics Charts

Device Distribution

{% if device_stats %} {% else %}

No device data available

{% endif %}

Browser Usage

{% if browser_stats %} {% else %}

No browser data available

{% endif %}

QR Code Location Analytics

{{ location_stats|length }} locations
{% for location in location_stats %} {% endfor %}
QR Code Location Event Total Scans Unique Users GPS Scans Date Range GPS Rate
{{ location.qr_name }} {{ location.qr_location }} {{ location.location_event }} {{ "{:,}".format(location.total_scans) }} {{ location.unique_users }} {{ location.gps_scans }} {{ location.first_scan.strftime('%m/%d') }} - {{ location.last_scan.strftime('%m/%d') }} {% set gps_rate = (location.gps_scans / location.total_scans * 100) if location.total_scans > 0 else 0 %}
{{ "{:.0f}".format(gps_rate) }}%

IP Address Analysis (Top 3)

{{ ip_stats|length }} unique IPs
{% for ip in ip_stats %} {% endfor %}
IP Address Total Scans Unique Users QR Codes Used First Seen Last Seen Activity Score
{{ ip.ip_address }} {{ "{:,}".format(ip.scan_count) }} {{ ip.unique_users }} {{ ip.qr_codes_used }} {{ ip.first_scan.strftime('%m/%d/%Y') }} {{ ip.last_scan.strftime('%m/%d/%Y') }} {% set activity_score = (ip.scan_count * ip.unique_users * ip.qr_codes_used) %}
{% if activity_score > 100 %} High {% elif activity_score > 20 %} Medium {% else %} Low {% endif %}
{% if project_stats %}

Project Analytics

{{ project_stats|length }} projects
{% for project in project_stats %} {% endfor %}
Project Name Total Scans Unique Users QR Codes GPS Usage Performance
{{ project.project_name }} {{ "{:,}".format(project.total_scans) }} {{ project.unique_users }} {{ project.qr_codes_in_project }}
{{ "{:.0f}".format(project.gps_usage_percentage) }}%
{% set avg_scans_per_qr = (project.total_scans / project.qr_codes_in_project) if project.qr_codes_in_project > 0 else 0 %}
{% if avg_scans_per_qr > 50 %} Excellent {% elif avg_scans_per_qr > 20 %} Good {% elif avg_scans_per_qr > 5 %} Fair {% else %} Poor {% endif %} {{ "{:.1f}".format(avg_scans_per_qr) }} scans/QR
{% endif %}
{% endblock %}