{% extends "paxalia/base.html" %} {% load static i18n %} {% block title %}{% trans "Compliance" %} – Paxalia Analytics{% endblock %} {% block page_title %}{% trans "Compliance" %}{% endblock %} {% block page_subtitle %}{% trans "Consent mode, data retention, and visitor deletion" %}{% endblock %} {% block extra_css %} {% endblock %} {% block dashboard_content %}

{% trans "Consent Mode" %}

{% if consent_enabled %} {% trans "Enabled" %}

{% blocktrans with cookie=consent_cookie_name value=consent_granted_value %}Nothing is tracked until a cookie named "{{ cookie }}" is present with value "{{ value }}" — set that cookie from your own consent-banner JS once a visitor accepts.{% endblocktrans %}

{% else %} {% trans "Disabled" %}

{% trans "Every visit is tracked immediately, same as before Phase 14. Set CONSENT_MODE_ENABLED = True in your PAXALIA_DASHBOARD settings dict to require consent first — see the README's Consent Mode section." %}

{% endif %}

{% trans "Data Retention" %}

{% trans "Configured via DATA_RETENTION_DAYS in your PAXALIA_DASHBOARD settings dict, applied by manage.py prune_analytics_data (schedule it via cron/Celery beat like the other maintenance commands)." %}

{% trans "Data type" %}{% trans "Retention" %}
PageView{{ data_retention_days.pageview|default:_("Kept forever") }}{% if data_retention_days.pageview %} {% trans "days" %}{% endif %}
AnalyticsEvent{{ data_retention_days.analytics_event|default:_("Kept forever") }}{% if data_retention_days.analytics_event %} {% trans "days" %}{% endif %}
JSError{{ data_retention_days.js_error|default:_("Kept forever") }}{% if data_retention_days.js_error %} {% trans "days" %}{% endif %}
UptimeCheck{{ data_retention_days.uptime_check|default:_("Kept forever") }}{% if data_retention_days.uptime_check %} {% trans "days" %}{% endif %}
SlowQuery{{ data_retention_days.slow_query|default:_("Kept forever") }}{% if data_retention_days.slow_query %} {% trans "days" %}{% endif %}
LoginEvent / SecurityAuditLog{{ security_log_retention_days }} {% trans "days (SECURITY_LOG_RETENTION_DAYS, separate setting)" %}
ServerMetricSnapshot{{ server_metric_retention_days }} {% trans "days (SERVER_METRIC_RETENTION_DAYS, pruned inline by record_server_metrics)" %}

{% trans "Forget This Visitor" %}

{% trans "Deletes every stored row for a given session ID or IP address. This is real, immediate deletion — there is no undo." %} {% trans "Note: JS errors can only be deleted by session ID (they don't store an IP)." %}

{% csrf_token %}
{% endblock %} {% block page_scripts %} {% endblock %}