08 — Post-Campaign Report
08 — Post-Campaign Report
Section titled “08 — Post-Campaign Report”Parent spec: 2026-05-23-08-advertiser-dashboard-design.md §5
Research: research/cf-cost-projection.md (D1 aggregate cost model)
Sequence from the T+24h cron trigger through bidder email + dashboard render.
- Trigger window: cron runs hourly; selects auctions whose ad-day ended in the last 2 hours but have no report yet. Idempotent —
report_generated_at IS NULLguard prevents double-send. - Email delivery: Resend with retry-on-4xx via Resend’s own queue. On terminal failure, dashboard banner surfaces “Report email could not be delivered” (08 spec E10).
- ROAS nullability: if there are zero
purchaserows inconversion_events, ROAS isnullin JSON; email body shows “ROAS unavailable — install pixel”; dashboard shows ”—” with tooltip “Tracking active, no purchases yet”. - PDF caching: R2 object retained 90 days; re-render on demand if expired or template-version bumped.
- Privacy: all metrics are aggregate counts; no per-visitor identifiers leave D1.
- Channel summary: email (primary delivery) + dashboard render (full interactive view) + CSV/PDF export (download).