{{-- ================= TOP NAVIGATION ================= --}}
@include('livewire.admin.partials.tab')
{{-- ================= FILTERS ================= --}}
@if(($role_id == 1) || in_array(97, $permissions)) @endif
{{-- ================= SUMMARY CARDS ================= --}} @php $ctr = ($total_data->total_impressions > 0) ? $total_data->total_click / $total_data->total_impressions * 100 : 0; $position = ($total_data->total_impressions > 0) ? $total_data->total_position / $total_data->total_impressions * 100 : 0; $total_views = $total_data->total_views; $average_time = ($total_views > 0) ? $total_data->total_avg_count / $total_views : 0; $cards = [ ['label' => 'Total URL Data', 'value' => number_format($total_data->total_news), 'icon' => 'ri-file-list-3-line', 'color' => 'primary'], ['label' => 'Total GSC Clicks', 'value' => number_format($total_data->total_click), 'icon' => 'ri-cursor-line', 'color' => 'success'], ['label' => 'Total GSC Impressions', 'value' => number_format($total_data->total_impressions), 'icon' => 'ri-eye-line', 'color' => 'info'], ['label' => 'Total GSC CTR', 'value' => number_format($ctr, 2) . '%', 'icon' => 'ri-percent-line', 'color' => 'warning'], ['label' => 'Total GSC Position', 'value' => number_format($position, 2), 'icon' => 'ri-bar-chart-line', 'color' => 'danger'], ['label' => 'Total GA Views', 'value' => number_format($total_data->total_views), 'icon' => 'ri-line-chart-line', 'color' => 'secondary'], ['label' => 'Total GA Users', 'value' => number_format($total_data->total_users), 'icon' => 'ri-group-line', 'color' => 'primary'], ['label' => 'Avg. Time', 'value' => number_format($average_time, 2) . 's', 'icon' => 'ri-time-line', 'color' => 'success'], ]; @endphp
@foreach ($cards as $card)
{{ $card['label'] }}
{{ $card['value'] }}
@endforeach
{{-- ================= DATA TABLE ================= --}}
GSC / GA Report
@forelse ($cryptoNews as $row) @php $authorTable = $authorTable ?? 'author_models'; $nameColumn = ($authorTable === 'users') ? 'name' : 'dispaly_name'; $authorRow = DB::table($authorTable)->select($nameColumn)->where('id', $row->author_id)->first(); $authorName = $authorRow->$nameColumn ?? '404 Not Found'; @endphp @empty @endforelse
# Slug Category Date Author Clicks Impressions CTR Position Views Users Avg. Time (GA) Bounce Rate
{{ $loop->iteration }} {{ $row->data_slug }} {{ $row->category_type }} {{ @$startDate }} – {{ @$endDate }} {{ $authorName }} {{ $row->click }} {{ $row->impresion }} {{ $row->ctr }} {{ number_format($row->position, 2) }} {{ $row->total_view }} {{ $row->total_users }} {{ isset($row->avg_count) && $row->avg_count != 0 ? number_format($row->avg_count, 2) . 's' : '0.00s' }} {{ isset($row['bounce_rate']) ? number_format($row['bounce_rate'], 2) . '%' : '0.00%' }}
No records found.