33 lines
2.0 KiB
PHP
33 lines
2.0 KiB
PHP
<x-report-layout :website="$website" :from="$from" :to="$to" title="Landing Pages">
|
|||
|
|
|
||
|
|
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
||
|
|
@if ($pages->isEmpty())
|
||
|
|
<div class="px-6 py-12 text-center text-sm text-gray-500">No landing page data available for this period.</div>
|
||
|
|
@else
|
||
|
|
<div class="overflow-x-auto">
|
||
|
|
<table class="min-w-full divide-y divide-gray-200">
|
||
|
|
<thead class="bg-gray-50">
|
||
|
|
<tr>
|
||
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Entry Page</th>
|
||
|
|
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Sessions</th>
|
||
|
|
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Bounce Rate</th>
|
||
|
|
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Avg. Duration</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody class="divide-y divide-gray-200">
|
||
|
|
@foreach ($pages as $row)
|
||
|
|
<tr>
|
||
|
|
<td class="px-6 py-3 text-sm text-gray-900 font-mono max-w-md truncate">{{ $row->path }}</td>
|
||
|
|
<td class="px-6 py-3 text-sm text-gray-900 text-right">{{ number_format($row->sessions) }}</td>
|
||
|
|
<td class="px-6 py-3 text-sm text-gray-900 text-right">{{ $row->sessions > 0 ? round(($row->bounces / $row->sessions) * 100, 1) : 0 }}%</td>
|
||
|
|
<td class="px-6 py-3 text-sm text-gray-900 text-right">{{ gmdate('i:s', (int) round($row->avg_duration)) }}</td>
|
||
|
|
</tr>
|
||
|
|
@endforeach
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
@endif
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</x-report-layout>
|