@extends('layouts.app') @section('title', 'Tracking Klik') @section('content') @php $userName = Auth::user()->name ?? 'Admin'; $ranges = ['today' => 'Hari Ini', '7' => '7 Hari', '30' => '30 Hari', 'all' => 'Semua']; $targetLabels = ['whatsapp' => 'WhatsApp'] + collect($platforms)->map(fn ($p) => $p['label'])->all(); $nextDirFor = function ($key) use ($sort, $dir) { if ($sort !== $key) { return $key === 'name' ? 'asc' : 'desc'; } return $dir === 'asc' ? 'desc' : 'asc'; }; $sortUrl = function ($key) use ($nextDirFor, $range, $search) { return route('admin.tracking.index', array_filter([ 'range' => $range, 'q' => $search, 'sort' => $key, 'dir' => $nextDirFor($key), ], fn ($v) => $v !== null && $v !== '')); }; $sortIc = fn ($key) => $sort === $key ? ($dir === 'asc' ? '▲' : '▼') : '⇅'; $isSorted = fn ($key) => $sort === $key ? 'is-sorted' : ''; @endphp
Pantau berapa kali tombol WhatsApp dan link marketplace pada produk diklik pengunjung.
Total Klik
{{ number_format($stats['total']) }}
Klik WhatsApp
{{ number_format($stats['whatsapp']) }}
Klik E-Commerce
{{ number_format($stats['ecommerce']) }}
Produk Diklik
{{ number_format($stats['products']) }}
| Produk {{ $sortIc('name') }} | WhatsApp {{ $sortIc('whatsapp') }} | @foreach($platforms as $key => $pf)
|
@endforeach
Total {{ $sortIc('total') }} | |||
|---|---|---|---|---|---|---|
|
{{ $p->name }}
Lihat di toko ↗
|
{{ number_format($counts->get('whatsapp', 0)) }} | @foreach($platforms as $key => $pf){{ number_format($counts->get($key, 0)) }} | @endforeach{{ number_format($p->totalClicks) }} | |||
| Belum ada data klik. | ||||||