{{-- Header --}}

{{ $landingWebsite->name }}

Rapport analytique
{{ $period->startDate->format('d/m/Y') }} — {{ $period->endDate->format('d/m/Y') }}
Généré le {{ now()->format('d/m/Y à H:i') }}
@if($showProvider ?? false)
Source : {{ ucfirst($analytics['provider'] ?? 'N/A') }}
@endif
{{-- Summary stats --}} @php $totals = $analytics['totalsForAllResults'] ?? []; @endphp
Résumé
{{ number_format($totals['sessions'] ?? 0, 0, ',', ' ') }}
Visiteurs uniques
{{ number_format($totals['pageviews'] ?? 0, 0, ',', ' ') }}
Pages vues
{{ number_format($totals['hits'] ?? 0, 0, ',', ' ') }}
Clics
{{ $formatter::formatDuration($totals['avgSessionDuration'] ?? 0) }}
Durée moyenne
@if(($totals['conversionRate'] ?? null) !== null)
{{ $formatter::formatPercentage($totals['conversionRate']) }}
Taux de conversion
@endif @if(($totals['avgTimeToFirstClick'] ?? null) !== null)
{{ $formatter::formatMs($totals['avgTimeToFirstClick']) }}
Temps avant 1er clic
@endif
{{-- SMS stats with funnel --}} @if($smsStats) @php $stats = $smsStats['stats'] ?? []; $sent = $stats['sent'] ?? 0; $delivered = $stats['delivered'] ?? 0; $sessions = $smsStats['sessions'] ?? 0; @endphp
Campagne SMS
{{-- Funnel: Envoyés → Délivrés → Visiteurs LP --}}
{{ number_format($sent, 0, ',', ' ') }}
SMS envoyés
{{ $smsStats['deliveryRate'] ? $formatter::formatPercentage($smsStats['deliveryRate'], 1) : '-' }}
{{ number_format($delivered, 0, ',', ' ') }}
SMS délivrés
{{ $smsStats['clickRate'] ? $formatter::formatPercentage($smsStats['clickRate'], 1) : '-' }}
{{ number_format($sessions, 0, ',', ' ') }}
Visiteurs LP
@if(($totals['hits'] ?? 0) > 0)
{{ $sessions > 0 ? $formatter::formatPercentage(($totals['hits'] / $sessions) * 100, 1) : '-' }}
{{ number_format($totals['hits'], 0, ',', ' ') }}
Clics LP
@endif @if(($totals['formSubmits'] ?? 0) > 0)
{{ $sessions > 0 ? $formatter::formatPercentage(($totals['formSubmits'] / $sessions) * 100, 1) : '-' }}
{{ number_format($totals['formSubmits'], 0, ',', ' ') }}
Soumissions
@endif
{{-- Detailed SMS metrics --}}
{{ number_format($stats['undeliverable'] ?? 0, 0, ',', ' ') }}
Non délivrables
{{ number_format($stats['rejected'] ?? 0, 0, ',', ' ') }}
Rejetés
{{ number_format($stats['expired'] ?? 0, 0, ',', ' ') }}
Expirés
{{ number_format($stats['stop'] ?? 0, 0, ',', ' ') }}
STOP
{{ $smsStats['unsubscribeRate'] !== null ? $formatter::formatPercentage($smsStats['unsubscribeRate'], 2) : '-' }}
Taux STOP
@endif {{-- Time series chart --}} @php $totalVisitors = $analytics['totalVisitors'] ?? []; @endphp @if(count($totalVisitors))
Évolution temporelle
@endif {{-- Audience charts --}} @php $topBrowsers = collect($analytics['topBrowsers'] ?? []); $topOs = collect($analytics['topOperatingSystems'] ?? []); @endphp @if($topBrowsers->isNotEmpty() || $topOs->isNotEmpty())
Audience
@php $deviceBreakdown = collect($analytics['deviceBreakdown'] ?? []); $scrollDepth = $analytics['scrollDepth'] ?? null; @endphp @if($deviceBreakdown->isNotEmpty() || $scrollDepth)
@if($deviceBreakdown->isNotEmpty())
@endif @if($scrollDepth)
Profondeur de scroll
@foreach([25, 50, 75, 100] as $depth)
{{ $depth }}% {{ $formatter::formatPercentage($scrollDepth[$depth] ?? 0, 0) }}
@endforeach
@endif
@endif
@endif {{-- Clicks section: heatmap screenshot + table side by side --}} @php $clicks = $analytics['clicksByElement'] ?? []; @endphp @if(count($clicks))
Top clics ({{ count($clicks) }})
@if($heatmapScreenshot)
Heatmap des clics
Carte de clics — premier écran
Faible
Moyen
Élevé
@endif
@foreach(array_slice($clicks, 0, 20) as $index => $click) @endforeach
# Élément Clics %
{{ $index + 1 }} {{ $formatter::formatClickLabel($click['click_id'] ?? '-', $click['click_text'] ?? null) }} {{ $click['count'] ?? 0 }} {{ $formatter::formatPercentage($click['percentage'] ?? 0) }}
@endif {{-- A/B Comparison --}} @if($abComparison) @php $v1 = $abComparison['variant1'] ?? []; $v2 = $abComparison['variant2'] ?? []; $deltas = $abComparison['deltas'] ?? []; $v1Rate = $v1['totals']['clickRate'] ?? 0; $v2Rate = $v2['totals']['clickRate'] ?? 0; $winner = $v1Rate >= $v2Rate ? $v1['key'] : $v2['key']; @endphp
Comparaison A/B
🏆 {{ $winner }}
Meilleur taux de clic
Métrique {{ $v1['key'] ?? 'A' }} {{ $v2['key'] ?? 'B' }} Écart
Visiteurs uniques {{ number_format($v1['totals']['uniqueVisitors'] ?? 0, 0, ',', ' ') }} {{ number_format($v2['totals']['uniqueVisitors'] ?? 0, 0, ',', ' ') }} {{ $formatter::formatDelta($deltas['uniqueVisitors'] ?? 0) }}
Pages vues {{ number_format($v1['totals']['pageviews'] ?? 0, 0, ',', ' ') }} {{ number_format($v2['totals']['pageviews'] ?? 0, 0, ',', ' ') }} {{ $formatter::formatDelta($deltas['pageviews'] ?? 0) }}
Clics {{ number_format($v1['totals']['clicks'] ?? 0, 0, ',', ' ') }} {{ number_format($v2['totals']['clicks'] ?? 0, 0, ',', ' ') }} {{ $formatter::formatDelta($deltas['clicks'] ?? 0) }}
Taux de clic {{ $formatter::formatPercentage($v1['totals']['clickRate'] ?? 0, 1) }} {{ $formatter::formatPercentage($v2['totals']['clickRate'] ?? 0, 1) }} {{ $formatter::formatDelta($deltas['clickRate'] ?? 0, true) }}
{{-- A/B clicks chart --}}
@endif {{-- Footer --}} {{-- Chart.js scripts --}}