{% extends "base.html" %} {% comment %} The analytics landing page (SPEC §18). Two tables and no chart: the chart lives on a flow's own page, where there is one subject to draw. Here the question is "which flows are running and how is each connection delivering", and both answers are lists. Flows with no counters in the range are absent rather than listed at zero. The flow list already answers "what exists"; this page answers "what has been running", and a page of zeroes answers neither. {% endcomment %} {% block title %}Insights · DemandTrail Messaging{% endblock %} {% block page_header %} {% endblock %} {% block content %}
{% comment %} The range's totals first, as number-and-word cards (HANDOFF §4, Analytics): the four answers a reader came for, before the tables that break them down. Failures carry the red dot only when there are some. {% endcomment %}
{{ totals.sent }}sent
{{ totals.delivered }}delivered
{{ totals.failed }}failed
{{ totals.clicked }}clicked{% if click_rate is not None %} · {{ click_rate|floatformat:1 }}% of sends{% endif %}
Flows Counted when the message actually leaves, not when the step runs.
{% if flow_rows %}
{% for row in flow_rows %} {% endfor %}
Flow Sent Delivered Failed Clicked
{{ row.flow.name }} {% if row.flow.status == "active" %}Live{% else %}{{ row.flow.get_status_display }}{% endif %} {{ row.sent }} {{ row.delivered }} {{ row.failed }} {{ row.clicked }}
{% else %}

No flow has sent anything in this range.

{% endif %}
Deliverability Every outbound message on each connection, including agent replies and API sends.
{% if connections %}
{% for row in connections %} {% comment %} Blank rather than 0% when nothing was sent: a rate with no denominator is not a rate. And a platform that reports no delivery receipts at all (SMS, email without a provider webhook) legitimately sits at 0% — the column says "delivered", not "arrived". {% endcomment %} {% endfor %}
Connection Messages Sent Delivered Failed Delivery rate
{{ row.connection.display_name }} {{ row.connection.get_platform_display }} {{ row.total }} {{ row.sent }} {{ row.delivered }} {{ row.failed }}{% if row.delivery_rate is not None %}{{ row.delivery_rate }}%{% else %}N/A{% endif %}
{% else %}

Nothing has been sent from this workspace in this range.

{% endif %}
{% endblock %}