@if (getSubscriptionSetting('status') && getActiveSubscriptionPlan() && getActiveSubscriptionPlan()->demographic_analysis_level == 'advanced') @livewire(App\Filament\App\Widgets\Store\GenderWiseStoreViewsChart::class, [ 'gender' => $this->getGenderData()->pluck('gender')->map(function ($gender) { return __('messages.t_' . $gender); // This will translate the gender values })->toArray(), 'views' => $this->getGenderData()->pluck('total_views')->toArray(), ]) @endif
@if (getSubscriptionSetting('status') && getActiveSubscriptionPlan() && in_array(getActiveSubscriptionPlan()->demographic_analysis_level, ['basic', 'advanced']))

{{ __('messages.t_age_group_data') }}

@if (count($ageTrafficData ?? [])) @foreach ($ageTrafficData ?? [] as $data) @endforeach
{{ __('messages.t_age_group') }} {{ __('messages.t_total_views') }}
{{ $data->age_group }} {{ $data->total_views }}
@else

{{ __('messages.t_data_not_available') }}

@endif
@endif
@if (getSubscriptionSetting('status') && getActiveSubscriptionPlan() && getActiveSubscriptionPlan()->demographic_analysis_level == 'advanced')

{{ __('messages.t_top_country_views') }}

@forelse($locationData as $location)
@unless ($location['country_code'] == 'N/A') {!! country2flag($location['country_code']) !!} @endunless @if ($location['country'] == 'N/A') {{ __('messages.t_unknown') }} @else {{ $location['country'] }} @endif
{{ $location['percentage'] }}% {{ $location['total_views'] }}
@empty

{{ __('messages.t_data_not_available') }}

@endforelse
@endif
@if (getSubscriptionSetting('status') && getActiveSubscriptionPlan() && getActiveSubscriptionPlan()->demographic_analysis_level == 'advanced')

{{ __('messages.t_operating_system') }}

@forelse ($osData as $os)
{{ $os->os ?? __('messages.t_unknown') }}
{{ round(($os->total_views / $osData->sum('total_views')) * 100, 2) }}% {{ $os->total_views }}
@empty

{{ __('messages.t_data_not_available') }}

@endforelse

{{ __('messages.t_browser') }}

@forelse ($browserData as $browser)
{{ $browser->browser ?? __('messages.t_unknown') }}
{{ round(($browser->total_views / $browserData->sum('total_views')) * 100, 2) }}% {{ $browser->total_views }}
@empty

{{ __('messages.t_data_not_available') }}

@endforelse

{{ __('messages.t_device') }}

@forelse ($deviceData as $device)
@if ($device->device_type == 'mobile') @endif @if ($device->device_type == 'desktop') @endif {{ ucfirst($device->device_type) ?? __('messages.t_unknown') }}
{{ round(($device->total_views / $deviceData->sum('total_views')) * 100, 2) }}% {{ $device->total_views }}
@empty

{{ __('messages.t_data_not_available') }}

@endforelse
@endif @if (getSubscriptionSetting('status') && getActiveSubscriptionPlan() && in_array(getActiveSubscriptionPlan()->utm_parameters_level, ['basic', 'advanced'])) {{ $this->table }} @endif