@php $usdToTndRate = 4; @endphp

Details de l'ad Meta

{{ $connection->ad_account_name }} ({{ $connection->ad_account_id }})

@include('integrations.meta.partials.ad-config-modal', ['connection' => $connection, 'ad' => $ad, 'redirectTo' => 'ad']) @include('integrations.meta.partials.ad-copy-modal', [ 'connection' => $connection, 'ad' => $ad, 'destinationConnections' => $destinationConnections, 'redirectTo' => 'ad', ]) Retour aux ads
@if ($ad->isMirroredLocalCopy())
Cette ad est une copie historique importee depuis un autre compte publicitaire dans l'application. Elle conserve les metriques d'origine pour le rapport.
@endif

Identification

Nom de l'ad
{{ $ad->ad_name ?: '-' }}
Ad ID
{{ $ad->ad_id }}
Statut
{{ $ad->displayStatusLabel() }}
@if ($ad->effective_status)
Meta (ad) : {{ $ad->effective_status }}
@endif @if ($ad->campaign_effective_status)
Meta (campagne) : {{ $ad->campaign_effective_status }}
@endif @if ($ad->adset_effective_status)
Meta (ad set) : {{ $ad->adset_effective_status }}
@endif @if ($ad->delivery_end_at)
Fin prevue : {{ $ad->delivery_end_at->format('d/m/Y H:i') }}
@endif
Derniere synchronisation
{{ $ad->updated_at?->format('d/m/Y H:i') ?? '-' }}

Structure de diffusion

Campagne
{{ $ad->campaign_name ?: '-' }}
{{ $ad->campaign_id ?: '-' }}
Ad set
{{ $ad->adset_name ?: '-' }}
{{ $ad->adset_id ?: '-' }}

Configuration publication

Nom de publication et type d'objectif pour le rapport Meta.

Nom de publication
{{ $ad->post_name ?: 'Non configure' }}
Type d'objectif
{{ $ad->resultTypeLabel() ?: 'Non configure' }}

Metriques lifetime

Cumuls lifetime recuperees depuis l'endpoint insights (niveau ad).

Spend
{{ number_format((float) ($ad->lifetime_spend ?? 0), 2, ',', ' ') }} $
{{ number_format(((float) ($ad->lifetime_spend ?? 0)) * $usdToTndRate, 2, ',', ' ') }} TND
Impressions
{{ number_format((int) ($ad->lifetime_impressions ?? 0), 0, ',', ' ') }}
Clicks
{{ number_format((int) ($ad->lifetime_clicks ?? 0), 0, ',', ' ') }}
CPC
{{ number_format((float) ($ad->lifetime_cpc ?? 0), 4, ',', ' ') }} $
{{ number_format(((float) ($ad->lifetime_cpc ?? 0)) * $usdToTndRate, 4, ',', ' ') }} TND
CTR
{{ number_format((float) ($ad->lifetime_ctr ?? 0), 4, ',', ' ') }}%
CPM
{{ number_format((float) ($ad->lifetime_cpm ?? 0), 4, ',', ' ') }} $
{{ number_format(((float) ($ad->lifetime_cpm ?? 0)) * $usdToTndRate, 4, ',', ' ') }} TND
Resultats
{{ number_format((int) ($ad->lifetime_results ?? 0), 0, ',', ' ') }}
Interactions
{{ number_format((int) ($ad->lifetime_interactions ?? 0), 0, ',', ' ') }}

Alerte email

Apres chaque synchronisation : alerte rouge si CPM, CPC ou cout par resultat depasse le seuil ($). Alerte verte si le total de resultats atteint l'objectif.

@if ($alert?->is_active) Alerte active @endif
@php $initialAlertEmails = old('emails', $alert?->emails ?? [auth()->user()->email]); @endphp
@csrf
@error('emails')

{{ $message }}

@enderror @error('emails.*')

{{ $message }}

@enderror

Alerte si le CPM depasse le seuil.

@error('cpm_threshold')

{{ $message }}

@enderror

Alerte si le CPC depasse le seuil.

@error('cpc_threshold')

{{ $message }}

@enderror

Action requise : alerte si le cout par resultat depasse le seuil ($). Mettez l'ad en pause.

@error('result_threshold')

{{ $message }}

@enderror

Felicitations quand le nombre total de resultats atteint l'objectif.

@error('results_count_threshold')

{{ $message }}

@enderror @if ($ad->lifetime_results > 0)

Actuel : {{ number_format((int) $ad->lifetime_results, 0, ',', ' ') }} resultat(s)

@endif
@error('alert')

{{ $message }}

@enderror
@if ($alert) @endif
@if ($alert)
@csrf @method('DELETE')
@endif @if ($alert?->last_triggered_at)

Derniere alerte envoyee : {{ $alert->last_triggered_at->format('d/m/Y H:i') }}

@endif
@php $initialReportType = old('report_type', \App\Mail\MetaAdReportMail::TYPE_COST_TOO_HIGH); $initialPostUrl = old('post_url', ''); $initialSelectedUserIds = collect(old('user_ids', []))->map(fn ($id) => (string) $id)->values()->all(); $reportRecipientsForJs = $reportRecipients->map(fn ($user) => [ 'id' => (string) $user->id, 'name' => $user->name, 'email' => $user->email, ])->values(); @endphp
@if ($errors->has('report_type') || $errors->has('post_url') || $errors->has('user_ids') || $errors->has('user_ids.*'))
@endif