analysis_delivery_collapse_check
Detect campaigns whose impressions suddenly drop while status remains active, using a same-weekday median baseline to avoid false weekend alerts. Works with any platform's day-grain delivery report.
Instructions
Detect delivery collapse: campaigns whose impressions fell off a cliff while their status still says they should be serving. The inverse of google_ads_cost_increase_investigate, and the scheduled detector /daily-check runs. Feed it a day-grain delivery report (one row per campaign per day, ~30+ days) for ANY platform — hosted connectors, bridges and plugins included. The baseline is the median of the SAME WEEKDAY from those rows, so weekend dips do not fire, and it never reads action_log, so it works on accounts operated partly by hand. The current (partial) day is always excluded. Thresholds come from STRATEGY.md ## Guardrails (delivery_collapse_drop_pct, delivery_collapse_consecutive_days, delivery_collapse_min_baseline_impressions, delivery_collapse_baseline_days) and default to a 90% drop against a 28-day baseline. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Day-grain delivery rows, one per (campaign, day), covering at least the last ~30 days. Any platform that can produce this shape gets the same detection: hosted connectors (tiktok_ads), official-MCP bridges (Amazon), and plugin platforms alike. | |
| as_of | No | Treat this YYYY-MM-DD date as 'today'; days on or after it are partial and are not evaluated. Defaults to the server's current date. | |
| platform | Yes | Platform key the rows came from (google_ads, meta_ads, tiktok_ads, plugin:<distribution>:<name>, …). Reported back on every signal. | |
| reported_through | No | YYYY-MM-DD: the last date the platform has actually REPORTED delivery for. Optional. Without it the tool infers the frontier as the latest date appearing anywhere in `rows`, which assumes every campaign in `rows` was fetched in one request and finalises at the same time. Set it when that does not hold — rows stitched together from several fetches, or a connector whose campaigns finalise at different times — using the OLDEST per-campaign last date you trust. Do NOT pass the end of the range you requested: that asserts coverage the platform never confirmed and turns reporting lag into a false collapse. |