@extends('layouts.app') @section('content') @include('layouts.sidebar')
{{--

Analytics

--}}

Total QR'S Created

{{ $totalQrs }}

Total Projects Created

{{ $totalProjects }}

Total Active Customers

{{ $totalActiveCustomers }}

{{--

Total Brand Impressions

1,039

--}}

New Customers Onboarded

{{ $newCustomers }}

New Partners Onboarded

{{ $newPartners }}

Total Impression Count

{{ $totalImpressionCount }}



Top Customer By projects

View all

Name

Projects

@foreach ($topCustomersByProjects as $key => $topCustomersByProject)

{{ $topCustomersByProject->name }}

{{ count($topCustomersByProject->projects) }}


@endforeach

Top Customer By QR Created

View all

Name

Qrs

@foreach ($topCustomersByQrs as $key => $topCustomersByQr)

{{ $topCustomersByQr->name }}

{{ count($topCustomersByQr->qrs) }}


@endforeach

Top Customer By Impression

View all

Name

Scan

@foreach ($topCustomersByImpression as $key => $customerImpression)

{{ $customerImpression->name }}

{{ count($customerImpression->scannedQrs) }}


@endforeach

Top Projects

View all

Name

Qrs
@foreach ($topProjects as $key => $topProject)

{{ $topProject->name }}

{{ count($topProject->qrs) }}


@endforeach

Top Project By Impression

View all

Name

Scan

@foreach ($topProjectsByImpression as $key => $projectImpression)

{{ $projectImpression->name }}

{{ count($projectImpression->scannedQrs) }}


@endforeach

Top Map Function By Qrs

{{-- View all --}}

Name

Count

@foreach ($topMapFunction as $key => $function) @php if ($function['type'] == 1) { $name = 'Scan to call'; } elseif ($function['type'] == 2) { $name = 'SMS'; } elseif ($function['type'] == 3) { $name = 'Mail'; } elseif ($function['type'] == 4) { $name = 'URL'; } elseif ($function['type'] == 5) { $name = 'Text'; } elseif ($function['type'] == 6) { $name = 'Whatsapp'; } elseif ($function['type'] == 7) { $name = 'Connect to WiFi'; } elseif ($function['type'] == 8) { $name = 'Emergency Contact'; } elseif ($function['type'] == 9) { $name = ' Lost and Found'; } elseif ($function['type'] == 10) { $name = ' Contact Information'; } else { $name = null; } @endphp

{{ $name }}

{{ $function['count'] }}


@endforeach




Countries - Top 10
@php $total = array_sum(array_column($countries, 'count')); @endphp @foreach ($countries as $country) @php $percentage = ($country['count'] / $total) * 100; @endphp

{{ $country['country'] }}

({{ round($percentage, 2) }}%)

@endforeach
States - Top 10
@php $total = array_sum(array_column($states, 'count')); @endphp @foreach ($states as $state) @php $percentage = ($state['count'] / $total) * 100; @endphp

{{ $state['state'] }}

({{ round($percentage, 2) }}%)

@endforeach
Cities - Top 10
@php $total = array_sum(array_column($cities, 'count')); @endphp @foreach ($cities as $city) @php $percentage = ($city['count'] / $total) * 100; @endphp

{{ $city['city'] }}

({{ round($percentage, 2) }}%)

@endforeach
@section('script') {{-- --}} @endsection