{{-- Metric cards --}}
{{-- Visitors chart --}}

Visitors & Page Views

Visitors Page Views Sessions
@if (collect($chartData)->sum('page_views') > 0)
@else @endif
{{-- Two-column: Top Pages + Top Sources --}}
{{-- Top pages --}}

Top Pages

View all
@if ($topPages->isEmpty()) @else
@php $maxViews = $topPages->max('views') ?: 1; @endphp @foreach ($topPages as $page)
{{ Str::limit($page->path, 50) }} {{ number_format($page->views) }}
@endforeach
@endif
{{-- Top sources --}}

Traffic Sources

View all
@if ($topSources->isEmpty()) @else
@php $maxSess = $topSources->max('sessions') ?: 1; @endphp @foreach ($topSources as $src)
{{ $src->source }} {{ number_format($src->sessions) }}
@endforeach
@endif
{{-- Goal completions --}} @if ($goalConversions->isNotEmpty())

Goal Completions

@foreach ($goalConversions->where('is_active', true)->take(6) as $goal)
{{ $goal->name }} {{ $goal->conversion_rate }}%
{{ number_format($goal->completions) }}
@if ($goal->total_value)
${{ number_format($goal->total_value, 2) }} value
@endif
@endforeach
@if ($goalChartData->sum('completions') > 0)
@endif
@endif
@push('scripts') @endpush