@php $quality = $session_quality ?? []; @endphp

Converted sessions

{{ number_format($quality['converted'] ?? 0) }}

Abandoned sessions

{{ number_format($quality['abandoned'] ?? 0) }}

Avg events / session

{{ number_format($quality['avg_events'] ?? 0, 1) }}

Avg pages / session

{{ number_format($quality['avg_pages'] ?? 0, 1) }}

Duration distribution

How long sessions stay active

@foreach($duration_buckets ?? [] as $label => $count)
{{ number_format($count) }} {{ $label }}
@endforeach

Session explorer

Recent sessions with conversion / abandonment flags

@forelse($sessions_table ?? [] as $row) @empty @endforelse
Session IP Location Device Pages Events Duration Status Last activity
{{ Str::limit($row->session_id, 14) }} @php $ip = (string) $row->ip_address; @endphp {{ strlen($ip) === 64 && !str_contains($ip, '.') ? Str::limit($ip, 12).'…' : ($ip ?: '—') }} {{ collect([$row->city, $row->country])->filter()->implode(', ') ?: '—' }} {{ $row->device_type ?: '—' }} {{ number_format($row->page_views) }} {{ number_format($row->events) }} {{ number_format($row->duration_seconds) }}s @if($row->converted) Converted @else Abandoned @endif {{ $row->ended_at ? \Illuminate\Support\Carbon::parse($row->ended_at)->diffForHumans() : '—' }}
No sessions in range.