@extends('layouts.promoter') @section('page-title', 'Analytics') @section('content')
{{-- Header --}}

Analytics

Track your live session performance

{{-- Stat Cards --}}
@if($sessionsChange != 0) {{ abs($sessionsChange) }}% @endif

{{ number_format($periodSessions) }}

Sessions this period

{{ number_format($periodViewers) }}

Avg {{ $avgViewersPerSession }} viewers/session

{{ number_format($periodSales) }}

Sales this period

{{ price($periodCommission) }}

Commission this period

{{-- Charts Row --}}

Activity Over Time

Sessions & viewers trend

Sessions
Viewers

Session Status

Distribution of sessions

@php $statusColors = ['active' => 'bg-red-400', 'completed' => 'bg-emerald-400', 'scheduled' => 'bg-blue-400', 'cancelled' => 'bg-gray-400']; @endphp @foreach($statusDistribution as $status)
{{ $status->status }}
{{ $status->count }}
@endforeach
{{-- Performance Metrics --}}

Performance Summary

Overall live streaming metrics

{{ number_format($totalSessions) }}

Total Sessions

{{ number_format($totalViewers) }}

Total Viewers

{{ number_format($totalSales) }}

Total Sales

{{ price($totalCommission) }}

Total Commission

{{ $avgSalesPerSession }}

Avg Sales/Session

{{-- Recent Sessions & Top Products --}}
{{-- Recent Sessions --}}

Recent Sessions

Your latest live sessions

@forelse($sessions as $session) @empty @endforelse
Title Status Viewers Revenue

{{ $session->title }}

{{ $session->product_name }}

{{ $session->status }} {{ number_format($session->viewers_count) }} {{ price($session->revenue) }}
No sessions yet
{{-- Top Products --}}

Top Products

Best sellers from your sessions

@forelse($topProducts as $index => $product) @empty @endforelse
# Product Sales Revenue
{{ $index + 1 }}

{{ $product->name }}

{{ number_format($product->sales_count) }} {{ price($product->revenue) }}
No sales data available
@php $currency = currentCurrency(); $currencySymbol = $currency->symbol; $exchangeRate = (float) $currency->exchange_rate; @endphp @push('scripts') @endpush @endsection