{{-- Header --}}

Integrações Google

Conecte Google Search Console e Analytics para insights de SEO

{{-- Flash Messages --}} @if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif {{-- Site Selector --}}
@if (!$selectedSiteId)
🔗

Selecione um site para configurar integrações

@else
{{-- GSC Connection Card --}}
GSC

Search Console

@if ($isConnected)
Connected
@if ($gscConnection->site_url)

{{ $gscConnection->site_url }}

@endif
@else

Conecte para ver keywords, posições e oportunidades de melhoria.

@endif
{{-- GA Connection Card --}}
GA

Analytics (GA4)

Em breve: integração com Google Analytics 4

{{-- Quick Stats --}} @if (!empty($gscData))

Summary (28 days)

@php $totalClicks = collect($gscData)->sum('clicks'); $totalImpressions = collect($gscData)->sum('impressions'); $avgPosition = collect($gscData)->avg('position'); $avgCtr = collect($gscData)->avg('ctr'); @endphp

{{ number_format($totalClicks) }}

Cliques

{{ number_format($totalImpressions) }}

Impressões

{{ round($avgPosition, 1) }}

Posição Média

{{ round($avgCtr * 100, 1) }}%

CTR Médio

@endif
{{-- Data Tabs --}} @if (!empty($gscData) || !empty($opportunities))
{{-- Tab Navigation --}}
{{-- Keywords Tab --}} @if ($activeTab === 'keywords' && !empty($gscData))
@foreach ($gscData as $row) @endforeach
Keyword Cliques Impressões CTR Posição
{{ $row['keys'][0] ?? '-' }} {{ number_format($row['clicks'] ?? 0) }} {{ number_format($row['impressions'] ?? 0) }} {{ round(($row['ctr'] ?? 0) * 100, 1) }}% {{ round($row['position'] ?? 0, 1) }}
@endif {{-- Pages Tab --}} @if ($activeTab === 'pages' && !empty($topPages))
@foreach ($topPages as $page) @endforeach
Página Cliques Impressões
{{ str_replace($gscConnection->site_url ?? '', '', $page['keys'][0] ?? '-') }} {{ number_format($page['clicks'] ?? 0) }} {{ number_format($page['impressions'] ?? 0) }}
@endif {{-- Opportunities Tab --}} @if ($activeTab === 'opportunities' && !empty($opportunities))

Opportunities: Keywords between position 8-20 with good growth potential. Optimize these contents!

@foreach ($opportunities as $opp) @endforeach
Keyword Posição Impressões Potencial
{{ $opp['keyword'] }} {{ $opp['position'] }} {{ number_format($opp['impressions']) }}
{{ $opp['potential'] }}%
@endif
@endif @endif