feat: SEO/GEO admin hub — GSC, Bing, Umami sync + search/funnel/scorecard views

# Conflicts:
#	CHANGELOG.md
#	uv.lock
#	web/src/padelnomics/admin/templates/admin/base_admin.html
#	web/src/padelnomics/core.py
This commit is contained in:
Deeman
2026-02-23 15:23:03 +01:00
19 changed files with 2337 additions and 1 deletions

View File

@@ -7,6 +7,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [Unreleased]
### Added
- **SEO/GEO admin hub** — syncs search performance data from Google Search Console (service
account auth), Bing Webmaster Tools (API key), and Umami (bearer token) into 3 new SQLite
tables (`seo_search_metrics`, `seo_analytics_metrics`, `seo_sync_log`); daily background
sync via worker scheduler at 6am UTC; admin dashboard at `/admin/seo` with three HTMX tab
views: search performance (top queries, top pages, country/device breakdown), full funnel
(impressions → clicks → pageviews → visitors → planner users → leads), and per-article
scorecard with attention flags (low CTR, no clicks); manual "Sync Now" button; 12-month
data retention with automatic cleanup; all data sources optional (skip silently if not
configured)
- **Landing zone backup to R2** — append-only landing files (`data/landing/*.json.gz`)
synced to Cloudflare R2 every 30 minutes via systemd timer + rclone; extraction state
DB (`.state.sqlite`) continuously replicated via Litestream (second DB entry in existing