@extends('layouts.user_type.auth') @section('pageTitle', 'Visitor Analytics') @section('pageSub', 'Track real-time traffic, page views, visitor devices, browsers and daily trends.') @section('pageActions') Export CSV @if(request()->hasAny(['search', 'ip_address', 'page_url', 'date_preset', 'from_date', 'to_date', 'visit_date', 'device', 'browser', 'os'])) Clear Filters @endif @endsection @section('visitorTracker') @include('components.alert') @php $currentPreset = request('date_preset', ''); $totalSample = max(1, array_sum($deviceBreakdown)); $desktopPct = round(($deviceBreakdown['Desktop'] ?? 0) * 100 / $totalSample); $mobilePct = round(($deviceBreakdown['Mobile'] ?? 0) * 100 / $totalSample); $botPct = round(($deviceBreakdown['Bot'] ?? 0) * 100 / $totalSample); $activeFiltersCount = collect(['search', 'ip_address', 'page_url', 'date_preset', 'from_date', 'to_date', 'visit_date', 'device', 'browser', 'os'])->filter(fn($k) => request()->filled($k))->count(); @endphp {{-- ==================== DASHBOARD KPIS ==================== --}}
| Visitor & Device | Page Visited | Browser | Visit Date | Recorded Timestamp |
|---|---|---|---|---|
|
{{ $visitor->ip_address }}
{{ $vtOs }} · {{ $vtBot ? 'Crawler' : ($vtMobile ? 'Mobile' : 'Desktop') }}
|
{{ \Illuminate\Support\Str::limit($vtPath, 45, '…') }}
@if(filter_var($visitor->page_url, FILTER_VALIDATE_URL))
@endif
|
{{ $vtBrowser }} | {{ \Carbon\Carbon::parse($visitor->visit_date)->format('j M Y') }} | @if($visitor->created_at) {{ $visitor->created_at->format('j M Y') }} {{ $visitor->created_at->format('g:i A') }} ({{ $visitor->created_at->diffForHumans() }}) @else — @endif |
|
No visits match the criteria
Try adjusting or clearing your date range, browser or device filters.
|
||||