@include('Partials.sidebar')
@include('Partials.header')

Tour Analytics

Wishlists, interest patterns & lead source ROI @if(isset($currentTenant)) • {{ $currentTenant->name ?? 'Tenant' }} @endif

  1. ›
  2. Reports
  3. ›
  4. Tour Analytics
{{-- Inventory summary --}}
@foreach([ ['Total Inventory', $inventory['total'], '#64748b','fa-home'], ['Available', $inventory['available'], '#22c55e','fa-check-circle'], ['Booked/Sold', $inventory['booked'], '#ef4444','fa-lock'], ['Sell-Through', $inventory['pct_sold'].'%', '#c9a96e','fa-percentage'], ] as [$label,$val,$color,$icon])
{{ $label }}
{{ $val }}
@endforeach
{{-- Most wishlisted --}}
❤️ Most Wishlisted Units
@forelse($mostWishlisted as $i => $p) @php // Use the aliased column names from the query $plotNumber = $p->plot_plot_number ?? $p->wishlist_plot_number ?? 'N/A'; $plotType = $p->plot_plot_type ?? $p->wishlist_plot_type ?? 'N/A'; $price = $p->plot_offer_price ?: $p->plot_actual_price ?: $p->wishlist_price; $isAvail = strtolower($p->plot_status ?? '') === 'available'; $medals = ['🥇','🥈','🥉']; $medal = $medals[$i] ?? ($i+1); @endphp
{{ $medal }}
Unit {{ $plotNumber }}
{{ $plotType }} • {{ $currency }}{{ number_format($price, 0) }}
{{ $p->wishlist_count }}
{{ $p->plot_status ?? 'Unknown' }}
@empty
No wishlist data yet.
@endforelse
{{-- Lead source ROI --}}
🎯 Lead Source ROI
@forelse($leadSources as $s) @php $quality = match(true) { $s->conversion_rate >= 30 => ['Excellent','success'], $s->conversion_rate >= 15 => ['Good','primary'], $s->conversion_rate >= 5 => ['Average','warning'], default => ['Low','danger'], }; @endphp @empty @endforelse
SourceTotal LeadsConvertedConv. RateQuality
{{ $s->source_config['icon'] ?? '📌' }} {{ $s->source_config['label'] ?? ucfirst($s->source) }} {{ $s->total }} {{ $s->converted }}
{{ $s->conversion_rate }}%
{{ $quality[0] }}
No lead source data.
{{-- Popular plot types --}}
🏠 Popular Plot Types
{{-- Lead source chart --}}
📊 Lead Volume by Source
@include('Partials.footer')