@extends('layouts.user_type.auth') @section('pageTitle', 'Marketing') @section('pageSub', 'Cold-email campaigns, replies and follow-ups — from lab lead to customer.') @section('pageActions') Labs New campaign @endsection @section('home') @include('pages_admin.marketing._nav') @include('components.alert') @php $stageTones = ['new' => 'info', 'contacted' => 'warning', 'interested' => 'success', 'demo_done' => 'primary', 'pilot' => 'violet', 'customer' => 'success']; $stages = ['new', 'contacted', 'interested', 'demo_done', 'pilot', 'customer']; $pct = fn ($a, $b) => $b > 0 ? round($a * 100 / $b) : null; $maxBar = max(1, $chart->max('n')); @endphp @foreach ($warnings as [$tone, $text])

{{ $text }}

@endforeach {{-- KPIs --}}
Labs ready to email
{{ number_format($stats['emailable']) }}
of {{ number_format($stats['labs']) }} labs in the list
Emails sent · 30 days
{{ number_format($mail['sent']) }}
@if ($stats['open_rate'] !== null && $mail['tracked']) {{ $stats['open_rate'] }}% opened @else Opens not tracked @endif @if ($mail['failed']){{ $mail['failed'] }} failed@endif
Replies
{{ number_format($stats['replied']) }}
@if ($stats['reply_rate'] !== null) {{ $stats['reply_rate'] }}% reply rate · 30d @endif aim for 3–5%
Demos → customers
{{ $stats['demos'] }} → {{ $stats['customers'] }}
demo done, pilot or customer
{{-- Pipeline --}}
Pipeline
Every lab sits in one stage. Click a stage to see those labs.
@foreach ($stages as $i => $s) @php $n = (int) ($pipeline[$s] ?? 0); $prev = $i ? (int) ($pipeline[$stages[$i-1]] ?? 0) : null; @endphp {{ \App\Models\Admin\MarketingLabs::STATUSES[$s] }} {{ number_format($n) }} {{ $i === 0 ? 'not emailed yet' : ($i === 1 ? 'email sequence sent' : 'stage ' . ($i + 1)) }} @endforeach
{{-- Today --}}
Follow up today
Replies come from follow-ups. Clear this list every morning.
{{ $taskCount }} due
@if ($tasks->isEmpty() && $warm->isEmpty())
Nothing due
Labs that click a link, or that you schedule a follow-up for, show up here.
@else @endif
{{-- Volume + funnel --}}
Sending · last 14 days
Steady small batches keep you out of spam.
@foreach ([['Sent', $mail['sent'], ''], ['Delivered', $mail['delivered'], 'z-progress--success'], ['Opened', $mail['opened'], ''], ['Clicked', $mail['clicked'], 'z-progress--warning'], ['Bounced', $mail['bounced'], 'z-progress--danger']] as [$label, $n, $tone])
{{ $label }}
{{ number_format($n) }}@if ($label !== 'Sent' && $mail['sent']) · {{ $pct($n, $mail['sent']) }}%@endif
@endforeach
{{-- Campaigns --}}
Campaigns
Each campaign sends a short sequence to one segment, a few dozen labs a day.
All campaigns
@if ($campaigns->isEmpty())
No campaigns yet
Start with one state and 30–40 emails a day. The recommended 4-email sequence is filled in for you.
@else
@foreach ($campaigns as $c) @php $s = $campaignStats[$c->id]; @endphp @endforeach
CampaignProgressSentOpenedReplies
{{ $c->name }}
{{ ucfirst($c->status) }}
{{ $s['enrolled'] }} labs · {{ $s['active'] }} in progress
{{ $s['sent'] }} {{ $s['open_rate'] !== null ? $s['open_rate'] . '%' : '—' }} {{ $s['replied'] }}
@endif
{{-- Checklist --}}
Sending setup
Fix these before scaling up.
@foreach ($checklist as $item)
@if ($item['ok'] === null) @elseif ($item['ok']) @else @endif
{{ $item['label'] }}{{ $item['hint'] }}
@endforeach
@endsection