Design a Multi-Organization Advertising Platform with Performance Statistics
DigitaloceanSoftware Engineer · OnsiteLast updated
Design ad management, serving, event collection, deduplicated statistics, and fair performance comparisons across organizations and campaigns.
Design an advertising platform that displays ads from multiple organizations and collects statistics to compare which ads perform better or worse.
Constraints
Ad formats, selection policy, traffic, billing, targeting, and the definition of performance are unspecified. Clarify the required features before adding auctions or personalization. Preserve organization boundaries and distinguish a valid ad display from a raw request or duplicate event.
Clarifying Questions
- Which organizations can create and manage ads, and what approval or eligibility rules apply?
- What counts as an impression, click, conversion, or other success event?
- Is performance compared by raw counts, rates, revenue, or another objective?
- How are duplicate, delayed, or invalid events handled?
Hints
Hint 1
Compare rates with their denominators: An ad with more clicks may simply have received more exposure; the event definitions and opportunity counts matter.
Follow-up questions
- How would you reconcile a click that arrives before its impression event?
- What experiment would support a causal claim that one ad performs better?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.