{{-- Device Type --}}

Device Type

@if ($devices->isNotEmpty()) @php $totalDevices = $devices->sum('visitors'); @endphp
@foreach ($devices as $row)
{{ $totalDevices > 0 ? round(($row->visitors / $totalDevices) * 100, 1) : 0 }}%
{{ $row->device_type ?? 'Unknown' }}
{{ number_format($row->visitors) }} visitors
@endforeach
@else

No device data available.

@endif
{{-- Browsers --}}

Browsers

@if ($browsers->isNotEmpty()) @php $totalBrowsers = $browsers->sum('visitors'); @endphp
@foreach ($browsers as $row)
{{ $row->browser }} {{ number_format($row->visitors) }} ({{ $totalBrowsers > 0 ? round(($row->visitors / $totalBrowsers) * 100, 1) : 0 }}%)
@endforeach
@else

No browser data available.

@endif
{{-- Operating Systems --}}

Operating Systems

@if ($operatingSystems->isNotEmpty()) @php $totalOS = $operatingSystems->sum('visitors'); @endphp
@foreach ($operatingSystems as $row)
{{ $row->os }} {{ number_format($row->visitors) }} ({{ $totalOS > 0 ? round(($row->visitors / $totalOS) * 100, 1) : 0 }}%)
@endforeach
@else

No OS data available.

@endif
{{-- Screen Resolutions --}}

Screen Resolutions

@if ($resolutions->isNotEmpty())
@foreach ($resolutions as $row) @endforeach
Resolution Visitors
{{ $row->screen_resolution }} {{ number_format($row->visitors) }}
@else

No screen resolution data available.

@endif