Design Ad Click Tracking
MediumSystem design · Event Processing · Meta
Design a system that ingests ad impression and click events, aggregates them by campaign, advertiser, time and geography, attributes conversions to clicks, and serves advertiser reporting. These counts drive billing, so accuracy matters more than in a typical analytics pipeline.
In scope: event ingestion, deduplication, invalid-traffic filtering, windowed aggregation with late data, conversion attribution, and reconciliation. Out of scope: the auction that served the ad.
Requirements
- Ingest events with low latency and high durability; never lose an accepted event
- Deduplicate events and handle late or out-of-order data using event time and watermarks
- Aggregate by campaign, advertiser, time bucket and geography with reporting latency of minutes
- Filter invalid traffic before billing, and reconcile billed totals against the auction log