{% extends 'admin/stats/_layout.html.twig' %} {% set stats_route_name = 'admin_stats_conversions' %} {% block stats_title %}Conversions{% endblock %} {% block stats_content %} {# --- KPI conversions --- #}
{{ counts.phone_click }}
Appels
{% include 'admin/stats/_trend.html.twig' with {trend: counts.phone_click_trend, invert: false} %}
{{ counts.email_click }}
Emails
{% include 'admin/stats/_trend.html.twig' with {trend: counts.email_click_trend, invert: false} %}
{{ counts.form_submit }}
Formulaires
{% include 'admin/stats/_trend.html.twig' with {trend: counts.form_submit_trend, invert: false} %}
{{ counts.total }}
Total conversions
{% include 'admin/stats/_trend.html.twig' with {trend: counts.total_trend, invert: false} %}
{# --- Entonnoir --- #}

Entonnoir

{% set max = funnel.visitors > 0 ? funnel.visitors : 1 %}
Visiteurs uniques
{{ funnel.visitors }}
> 1 page visitee
{{ funnel.engaged }} ({{ (funnel.engaged / max * 100)|round(1) }}%)
Vu page contact
{{ funnel.saw_contact }} ({{ (funnel.saw_contact / max * 100)|round(1) }}%)
Conversions
{{ funnel.converted }} ({{ funnel.rate ?? 0 }}%)
Taux de conversion : {{ funnel.rate ?? 0 }}%
{# --- Pages qui convertissent --- #}

Pages moteur

{% if pages|length > 0 %} {% for p in pages %} {% endfor %}
Page Conversions
{{ p.page_url }} {{ p.cnt }}
{% else %}

Aucune conversion.

{% endif %}
{# --- Parcours de conversion --- #}

Parcours type

{% if conversionPaths|length > 0 %} {% set maxPct = conversionPaths|first.pct %} {% for cp in conversionPaths %}
{{ cp.path }}
{{ cp.count }} sessions ({{ cp.pct }}%)
{% endfor %} {% else %}

Pas assez de conversions pour identifier des parcours.

{% endif %}

Pages critiques

{% if criticalPages|length > 0 %} {% for cp in criticalPages %} {% endfor %}
Page Sessions Presence
{{ cp.url }} {{ cp.sessions }} {{ cp.pct }}% {% if cp.pct > 50 %} {% endif %}
{% else %}

Pas assez de conversions.

{% endif %}
{# --- Conversions recentes --- #}

Conversions recentes

{% if recent|length > 0 %}
{% for r in recent %} {% endfor %}
Date Source Parcours Type Detail
{{ r.date|date('d/m H:i') }} {{ (r.source ?? 'direct')|replace({'_': ' '})|capitalize }} {{ r.journey ?: '—' }} {% if r.type == 'phone_click' %} {% elseif r.type == 'email_click' %} {% else %} {% endif %} {{ r.detail ?? '—' }}
{% else %}

Aucune conversion.

{% endif %}
{% endblock %}