@push('styles') @endpush @push('scripts') @endpush @push('scripts') @php // Ensure session app_id is set from authenticated user before retrieving it if (Auth::check()) { $user = Auth::user(); if ($user && isset($user->app_id) && $user->app_id) { session(['app_id' => $user->app_id]); } else { session()->forget('app_id'); } } else { session()->forget('app_id'); } $currentAppId = \App\Helpers\QueryHelper::getAppId(); $encryptedAppIdForExport = $currentAppId ? \App\Services\AppIdEncryptionService::encryptForUrl($currentAppId) : ''; @endphp @endpush {{-- Breadcrumbs Navigation - Hidden on Dashboard --}} {{-- --}} {{-- Full-page loader for filters and AJAX data loading --}} {{-- Full-page loader for export --}}
{{-- Export Report Button --}}

{{ $this->getTitle() }}

{{-- Header Filters Section - Billing Page Style --}}
{{-- Form removed - using custom HTML inputs with direct JavaScript handling --}} {{-- Row 1: KPI Cards - All 6 in single row --}}
{{-- KPI cards will be loaded via AJAX --}}

Registrations

Conversions

Conversion Rate

Churn Rate

Retention Rate Current

{{-- Row 1: Conversion vs Retention Rate, Payment Gateway Distribution, and Payment Success vs Cancellation Trends - Three columns --}}

Conversion vs Retention Rate

Conversion vs Retention Rate
Description:
Compares conversion rate and retention rate over the selected period.
Exclusions:
Rows outside the date range or missing required IDs/filters.
Formula:
Conversion % = Conversions / Registrations × 100; Retention % = 100 − Churn %
Loading chart data...

Payment Gateway Distribution

Payment Gateway Distribution
Description:
Shows share of payments by gateway within the selected period.
Exclusions:
Missing gateway names or records outside the date range.
Formula:
Gateway Share % = Gateway Payments / Total Payments × 100

Payment Success vs Cancellation Trends

Payment Success vs Cancellation Trends
Description:
Tracks successful and cancellation payment counts over time.
Exclusions:
Transactions outside the date range or missing status.
Formula:
Success = COUNT(status = success); Cancellation = COUNT(status = cancellation)
Loading chart data...
{{-- Row 2: Subscriber Timeline Chart - Single row --}}

Subscriber Timeline

Subscriber Timeline
Description:
Shows subscriber counts over time in the selected period.
Exclusions:
Dates outside the range or missing subscriber IDs.
Formula:
COUNT(DISTINCT Subscriber Id) by date
Loading chart data...
{{-- Row 3: Active Subscriber Movement Chart - Single row --}} {{-- Removed: Livewire component replaced with AJAX-based chart loading --}} {{-- Row 4: Cohort Retention and Payment Health by Gateway - 8:4 split --}}

Cohort Retention

Cohort Retention
Description:
Retention by cohort over time based on subscriber activity.
Exclusions:
Cohorts with insufficient data or outside the date range.
Formula:
Cohort Retention % = Active in period / Cohort size × 100
Loading chart data...

Payment Health by Gateway

Payment Health by Gateway
Description:
Shows success and failure performance by gateway.
Exclusions:
Gateways with no activity in the selected period.
Formula:
Success % = Successful payments / Total payments × 100
Loading chart data...
{{-- Row 6: Churned Customers and Payment Failures - Side by side --}} {{-- Removed: Livewire components replaced with AJAX-based widget loading --}}
@push('scripts') @php // Ensure session app_id is set from authenticated user before retrieving it if (Auth::check()) { $user = Auth::user(); if ($user && isset($user->app_id) && $user->app_id) { session(['app_id' => $user->app_id]); } else { session()->forget('app_id'); } } else { session()->forget('app_id'); } $currentAppId = \App\Helpers\QueryHelper::getAppId(); // Encrypt app_id for URL (same pattern as billing page) $encryptedAppId = $currentAppId ? \App\Services\AppIdEncryptionService::encryptForUrl($currentAppId) : ''; @endphp @endpush