Отслеживание изменений контента конкурентов и корреляции с трафиком 📈

Если пользуетесь Ahrefs, то наверняка видели их ИИ-платформу Letaido. Я наткнулся кейс, по одному из сценариев её использования:

1. Автоматически отслеживает изменения в контенте.
2. Измеряет, движется ли трафик вверх.
3. Сообщает, какие изменения повлияли на ситуацию.

Отчет генерируется автоматически, далее его можно расшарить членам команды. Пример отчета.

Полный текст промпта ниже (раскройте цитату):

Segment 1 — Goal, data, first steps

Build a "Content Change Report" tool. Given a website or subfolder (e.g. example.com/blog/) and a lookback window (1/3/6 months), find high-traffic pages that were significantly rewritten in that window, show how their traffic moved, explain what changed, and judge whether the change mattered vs. the page just riding a site-wide trend.

Data: Ahrefs Site Explorer API (needs historical access — 403 without it; surface clearly). Use top_pages, html_calendar, html_snapshot, top_pages_history_by_page, metrics_history.

Steps: (1) Resolve host — for a bare domain, probe apex vs www. and pick the higher-traffic one (domain mode does NOT merge them). (2) Pull top N pages by traffic (user-set "scan depth," default ~20). (3) Measure the site-wide trend ("the tide") via metrics_history over the SAME window/market — compare the point N months before latest to latest, not the full span.

Segment 2 — Analysis logic

(4) Read Ahrefs' own change class from html_calendar; keep only Major/Overhaul pages so badges match the Ahrefs UI (no custom thresholds). (5) Rank survivors by 0.6·|trafficΔ|_norm + 0.4·traffic_norm; keep top 10. (6) For survivors only, pull the html_snapshot before/after diff (char-level intra-segment diffing so a one-word edit isn't scored 100% changed). (7) Classify each page vs the site trend: within ±10 pts = "Tracking site," better = "Outperforming," worse = "Underperforming"; zero-prior-traffic pages = "New page" + absolute gain, never "+0%".

(8) LLM explanation: 1-line lead + 2–4 concrete-change bullets + a mandatory "Reading:" line. It MUST compare page-vs-site and say plainly when a move is just the tide. Forbid "caused/drove"; allow only "coincided with / may have contributed / unlikely to explain."

Segment 3 — UX & architecture

UX: inputs are URL path, lookback, market (~15 countries, NO "Global" — Ahrefs silently falls back to US), scan depth. Results show a hero "biggest mover," a "Site-wide trend: X%" line, and per-page cards (change badge, Tracking/Outperforming/Underperforming tag, metrics, sparkline, explanation). Exports: CSV + print-to-PDF (light/white). Public share: a "Share" button snapshots a FROZEN report to an unguessable read-only URL (no login) that makes ZERO live API calls when viewed — sharing can't burn credits; include revoke.

Architecture: run the pipeline on a background worker (too slow for a web-request timeout); UI polls a progress log. Worker must survive restarts — on startup, re-queue "queued" reports and fail "running" ones. Guard against mid-run deletes (skip final save, don't crash on FK errors) and cascade-delete child rows. Persist in Postgres, never in memory/JSON.

Value: it tells you which content changes actually moved the needle — and which just looked like they did.

🎰 SpinBetter Partners — Прямой рекл: 40+ GEO, выплаты каждую неделю! 15% игроков активны больше года.