{% extends "pretix_event_analytics/base.html" %} {% load i18n analytics_tags %} {% block section %} {% if data.no_series %}
{% trans "Loyalty needs more than one edition." %} {% trans "Link this event to a series (and the previous editions to the same series) to see first-timers, returning people and how editions overlap." %} {% trans "Open settings" %}
{% elif data.no_permission %}
{% trans "Loyalty compares every edition of the series." %} {% trans "Your team can only see some of those events, so these figures are hidden. Ask an administrator for order access to all editions." %}
{% else %} {% with fo=data.focus %}
{% trans "Count" %} {% trans "People (ticket holders)" %} {% trans "Customers (order e-mail)" %}
{% if fo %}

{% blocktrans with pct=fo.first_timer_pct n=fo.first_timers total=fo.participants %}{{ pct }}% of this edition's {{ total }} identified people are first-timers ({{ n }}).{% endblocktrans %} {% if fo.editions_so_far > 1 %} {% blocktrans with pct=fo.returning_pct %}{{ pct }}% have been before.{% endblocktrans %} {% endif %} {% if fo.incl %}{% blocktrans with pct=fo.incl.pct %}Including probable matches: {{ pct }}% first-timers.{% endblocktrans %}{% endif %}

{% blocktrans with year=data.history_start %}History starts in {{ year }}: someone whose last visit was before that counts as a first-timer.{% endblocktrans %} {% if not data.has_legacy %} {% trans "Have an old attendee or mailing list from earlier years?" %} {% trans "Import it as a past edition" %} — {% trans "only hashes of the addresses are kept." %} {% endif %} {% if fo.unidentified %}
{% if data.unit == "buyers" %}{% blocktrans with n=fo.unidentified pct=fo.coverage_pct %}{{ n }} orders have no e-mail and cannot be matched ({{ pct }}% coverage).{% endblocktrans %}{% else %}{% blocktrans with n=fo.unidentified pct=fo.coverage_pct %}{{ n }} tickets have no attendee name + birth date, or only an unclear match, and are left unknown rather than guessed ({{ pct }}% coverage). Asking for the attendee name and birth date on every ticket improves this.{% endblocktrans %}{% endif %} {% endif %}
{% trans "First time" %}
{{ fo.first_timers }} {{ fo.first_timer_pct }}%
{% trans "Been before" %}
{{ fo.returning }} {{ fo.returning_pct }}%
{% if fo.prev_label %}
{% blocktrans with l=fo.prev_label %}Also at {{ l }}{% endblocktrans %}
{{ fo.from_last }} {{ fo.from_last_pct }}%
{% trans "Came back after a gap" %}
{{ fo.after_gap }}
{% blocktrans with l=fo.prev_label %}been before, but not at {{ l }}{% endblocktrans %}
{% blocktrans with l=fo.prev_label %}From {{ l }}, not (yet) back{% endblocktrans %}
{{ fo.lost }} {{ fo.lost_pct }}%
{% blocktrans with n=fo.prev_size %}of {{ n }} people{% endblocktrans %}
{% trans "At every edition so far" %}
{{ fo.loyal_all }}
{% blocktrans count n=fo.editions_so_far %}{{ n }} edition{% plural %}{{ n }} editions{% endblocktrans %}
{% endif %}
{% if fo.prev_label and fo.lost or fo.lapsed %}
{% trans "Win them back:" %} {% if fo.lost %} {% blocktrans with n=fo.lost l=fo.prev_label %}{{ n }} from {{ l }} not back yet{% endblocktrans %}{% endif %} {% if fo.lapsed %} {% blocktrans with n=fo.lapsed l=fo.prev_label %}{{ n }} who came earlier but skipped {{ l }}{% endblocktrans %}{% endif %}
{% trans "Each list gives the order code of their most recent visit (as buyer or ticket holder), so you can find them in Pretix — for example to send a “we miss you” voucher. No addresses leave Pretix." %}
{% endif %}
{% trans "How many times have they been before?" as pt %} {% trans "People at this edition by number of earlier editions attended" as pn %} {% include "pretix_event_analytics/_chart.html" with chart=fo.previous_chart title=pt note=pn size="short" %}
{% trans "Breakdown" %}
{% for r in fo.previous_table %}{% endfor %}
{% trans "People" %}{% trans "Share" %}
{{ r.label }}{{ r.count }} {{ r.share }}%
{% elif data.focus_inactive %}
{% trans "This edition is excluded from comparisons in its settings, so it has no loyalty figures of its own. The series views below still work." %}
{% endif %} {% if data.segments %}

{% trans "Who are the first-timers?" %}{% trans "this edition · dashboard filters apply" %}

{% for seg in data.segments %}
{{ seg.title }}
{% for r in seg.rows %}{% endfor %}
{{ seg.column }}{% if data.unit == 'people' %}{% trans "Tickets" %}{% else %}{% trans "Orders" %}{% endif %}{% trans "First-timers" %}
{{ r.label }}{{ r.total }} {{ r.new_pct }}%
{% endfor %}
{% endif %}

{% trans "Compare editions" %}{% trans "pick any editions — whole series, filters do not apply" %}

{% for k, v in request.GET.lists %}{% if k != "compare" %}{% for x in v %}{% endfor %}{% endif %}{% endfor %}
{% for e in data.editions %} {% endfor %}

{% blocktrans with n=data.union eds=data.selected_labels|join:", " %}{{ n }} different people took part in {{ eds }}.{% endblocktrans %} {% if data.attended_all is not None %}{% blocktrans with n=data.attended_all %}{{ n }} were at all of them.{% endblocktrans %}{% endif %}

{% trans "How many of the selected editions did each person attend?" as ft %} {% include "pretix_event_analytics/_chart.html" with chart=data.frequency_chart title=ft size="short" %}
{% trans "Attended once, twice, …" %}
{% for r in data.frequency_table %}{% endfor %}
{% trans "People" %}{% trans "Share" %}
{{ r.label }}{{ r.count }} {{ r.share }}%
{% if data.overlap|length > 1 %}
{% trans "Overlap between editions" %}
{% trans "Read across: of the people at the row's edition, how many were also at the column's edition." %}
{% for l in data.selected_labels %}{% endfor %}{% for row in data.overlap %} {% for c in row.cells %} {% if c.self %}{% else %}{% endif %} {% endfor %} {% endfor %}
{{ l }}
{{ row.label }} ({{ row.size }})—{{ c.pct|floatformat:0 }}%
{{ c.count }}
{% endif %} {% if data.combos %}
{% trans "Most common attendance patterns" %}
{% trans "Exactly these editions and none of the other selected ones." %}
{% for l in data.selected_labels %}{% endfor %}{% for c in data.combos %} {% for m in c.marks %}{% endfor %} {% endfor %}
{{ l }}{% trans "People" %}{% trans "Share" %}
{{ c.count }}{{ c.share }}%
{% if data.combos_hidden %}
{% blocktrans count n=data.combos_hidden %}{{ n }} rarer pattern not shown.{% plural %}{{ n }} rarer patterns not shown.{% endblocktrans %}
{% endif %}
{% endif %}

{% trans "Edition by edition" %}{% trans "all editions of the series" %}

{% trans "Who made up each edition" as fl %} {% include "pretix_event_analytics/_chart.html" with chart=data.flow.chart title=fl %}
{% for r in data.flow.rows %}{% endfor %}
{% trans "Edition" %}{% trans "People" %}{% trans "First time" %}{% trans "Back from previous" %}{% trans "Back after a gap" %}{% trans "Previous edition's people who returned" %}{% trans "Did not return" %}
{{ r.label }}{% if r.legacy %} {% trans "imported" %}{% endif %}{% if r.on_sale %} {% trans "on sale" %}{% endif %} {{ r.total }}{{ r.new }} ({{ r.new_pct }}%) {{ r.from_prev }}{{ r.after_gap }} {% if r.retention_pct is not None %}{{ r.retention_pct }}%{% if r.on_sale %} {% trans "so far" %}{% endif %}{% else %}–{% endif %} {% if r.lost is not None %}{% if r.on_sale %}{% blocktrans with n=r.lost %}{{ n }} not yet{% endblocktrans %}{% else %}{{ r.lost }}{% endif %}{% else %}–{% endif %}
{% if data.first_cohorts.rows %}
{% trans "Do first-timers come back?" %}
{% trans "People grouped by the edition they first came to, and the share of them at each later edition." %}
{% for c in data.first_cohorts.columns %}{% endfor %}{% for r in data.first_cohorts.rows %} {% for p in r.pad %}{% endfor %} {% for c in r.cells %}{% endfor %} {% endfor %}
{% trans "First came" %}{{ c }}
{{ r.label }} ({{ r.size }}){{ c.pct|floatformat:0 }}%
{% endif %} {% if data.scores %}

{% trans "Likely to return" %}{% trans "predictive score, this selection" %}

{% trans "Return score distribution" as st %} {% blocktrans with n=data.scores.high p=data.scores.high_pct asvar sn %}{{ n }} orders ({{ p }}%) score 60 or more. The score adds points for past visits (+40), check-in (+20), buying 30+ days ahead (+15), 3+ tickets (+10), being local (+10) and group orders (+5).{% endblocktrans %} {% include "pretix_event_analytics/_chart.html" with chart=data.scores.chart title=st foot=sn size="short" %} {% endif %} {% endwith %} {% endif %} {% endblock %}