@php $bizName = trim($insight->name ?? 'Your Business'); $monthYear = optional($snapshot?->created_at)->format('F Y') ?? now()->format('F Y'); $rowsCollection = collect($rows ?? []); $topRows = $rowsCollection ->sortByDesc(fn($r) => (float) ($r['traffic_value'] ?? 0)) ->take(4) ->values(); $totalSearches = (int) $rowsCollection->sum(function ($r) { $v = $r['search_volume'] ?? $r['monthly_searches'] ?? 0; return is_numeric($v) ? (int) $v : 0; }); if ($totalSearches <= 0) { $totalSearches = 3300; } $top3SharePct = 70; $top3Searches = (int) round($totalSearches * ($top3SharePct / 100)); $keywordsLive = (int) ($stats['count_keywords'] ?? 0); if ($keywordsLive <= 0) { $keywordsLive = (int) $rowsCollection->filter(fn($r) => !empty($r['keyword']))->count(); } // For the "New Position" card we don't have a single definitive "new position" metric yet. // Use avg_position as a best-effort display (fallback #2 to match sample). $newPosition = is_numeric($stats['avg_position'] ?? null) ? (int) max(1, round((float) $stats['avg_position'])) : 2; $placeId = $insight->place_id ?? null; $secureUrl = route('onboarding', array_filter([ 'source' => 'top3search', 'pid' => $placeId, 'e' => $insight->email ?? null, 'n' => $insight->contact_name ?? null, 'c' => $insight->name ?? null, 'step_id' => (int) ($step->id ?? 0) ?: null, ])); @endphp

Top 3 Optimization Report

{{ $bizName }} | {{ $monthYear }}

 
Top 3 (Google Map Pack)
You’re now Top 3 for
{{ max(0, $keywordsLive) }} keywords
48-hour window to secure these positions.
Only one business per location
New Position
#{{ $newPosition }}
{{ max(0, $keywordsLive) }} keywords
live
 
Searches
{{ number_format($totalSearches) }}
Top 3 Share
~{{ number_format($top3Searches) }}
Keywords
{{ number_format(max(0, $keywordsLive)) }}
Top 3 Wins (Primary Keywords)
@forelse($topRows as $row) @php $k = (string) ($row['keyword'] ?? ''); $pos = $row['position'] ?? null; $posText = $pos !== null && is_numeric($pos) ? (int) $pos : '20+'; $searches = (int) ($row['search_volume'] ?? $row['monthly_searches'] ?? 0); $val = (float) ($row['traffic_value'] ?? 0); @endphp @empty @endforelse
Keyword Position Searches Value /mo
{{ $k !== '' ? $k : '—' }} {{ $posText }} {{ number_format(max(0, $searches)) }} £{{ number_format((int) round($val)) }}
Keyword wins will appear here once your optimized snapshot is available.
If you have questions, reply to this email.
@include('emails.partials.open-pixel')