All documentation

    Reports and Analytics

    Rank Pilot AI SEO surfaces performance data through three related dashboard pages — Reports, Analytics, and Search Performance (Google Analytics/Search Console) — plus a scheduled email digest.

    Reports (Reports.tsx)

    The Reports page pulls together everything needed for a shareable snapshot of a website's SEO performance:

    • The website record, latest site_audits row, tracked keywords, tracked competitors, 30 days of rank_history, and — where connected — Google Ads metrics via the google-ads-metrics function (dateRange: LAST_30_DAYS).
    • SEO report (PDF)handleSEOReport calls generateSEOReport (src/lib/generateReport.ts) with the website name/domain, the latest audit, formatted keyword rows (current/previous position, search volume, difficulty, trend), competitor list, and — if available — a Google Ads overview (spend/clicks/conversions plus campaign list) labelled "last 30 days". This produces a downloadable branded PDF report.
    • Structured JSON reporthandleGenerateJSON calls the seo-report-json edge function for the current website and returns a full structured JSON object, which the user can copy to clipboard or download as a .json file — useful for feeding into other systems or client deliverables.
    • CSV exports — keyword data (toCSV/downloadCSV from src/lib/csvExport.ts) exports position, change vs previous, search volume, difficulty, CPC and trend per keyword, and rank history exports timestamp/position pairs. Filenames are slugified from the domain and dated (e.g. example-com-keywords-2025-01-01.csv).
    • JSON insight cards — the page also renders BacklinkJSONCard, KeywordJSONCard, PagePerformanceJSONCard, CompetitorJSONCard, AnomalyDetectionJSONCard, DashboardLayoutJSONCard, SEOInsightsJSONCard and WeeklyRecapJSONCard — reusable structured summaries also seen in AI Tools and Competitors — plus ReportCharts for visual trend charts and GoogleAdsConversions for a conversions breakdown, and ExportAIResultsPDF for exporting saved AI tool outputs to PDF.

    Analytics (Analytics.tsx)

    The Analytics page is gated behind the full_technical_audit feature flag via FeatureGate. For the current website it renders:

    • AnalyticsKanban — a task-pipeline board view of SEO work.
    • InternalAnalyticsDashboard — audit scores, keyword rankings and site speed trends drawn from Rank Pilot AI SEO's own tracked data (not a third-party analytics platform).
    • GoogleAdsConversions — a Google Ads metrics panel showing conversion performance for websites with Ads connected, sitting alongside the organic data so paid and organic performance can be read together.

    Search Performance (GoogleAnalytics.tsx)

    Despite the file name, this page is the Search Console view rather than a Google Analytics integration — its heading is "Search Performance" and it's also gated by full_technical_audit. For the resolved website it shows:

    • GscPerformancePanel — live Google Search Console data (impressions, clicks, average position, CTR, etc.) for the connected property.
    • InternalAnalyticsDashboard — the same internal audit/ranking/speed dashboard used on the Analytics page, so Search Console data and the app's own tracked metrics sit side by side.

    If no website/property is selected, the page shows a prompt to open it from a specific website in the dashboard rather than erroring.

    Weekly email reports (send-weekly-digest)

    The send-weekly-digest edge function sends a scheduled weekly performance email per website. It pulls Google Ads summary data (via the shared google-ads.ts helper), computes keyword position movements week-over-week, and generates AI-powered "quick win" suggestions (title, rationale, effort level) through the AI gateway using structured tool-calling. Each digest also rotates in one "worth a read" blog post from a fixed internal list (covering topics like organic traffic, backlinks, autopilot, keyword clustering and GEO/AEO), chosen deterministically by hashing the ISO week key so the same post is featured all week for all recipients, then sent via the shared send-app-email helper.