Design a cross-channel frequency cap: policy, tech wiring, and measurement.
- User
Design a cross-channel frequency cap: policy, tech wiring, and measurement.
- Assistant
Design a cross-channel frequency cap: policy, tech wiring, and measurement.
Elementary. A cross-channel frequency cap prevents ad fatigue by limiting impressions per user across web, mobile app, CTV, email, social, and DSP/SSP buys. Below is a complete design: policy (rules), tech wiring (architecture), and measurement (verification). This assumes a unified user ID system (e.g., hashed email/phone + probabilistic signals like device ID/IP).
Define caps as enforceable thresholds, with flexibility for campaign goals. Use a tiered, configurable model stored in a policy engine (e.g., JSON/YAML).
| Scope | Max Impressions/User | Time Window | Channels Included | Exceptions |
|---|---|---|---|---|
| Daily | 5 | Rolling 24h | All (web, app, CTV, email, social, programmatic) | +2 for retargeting; unlimited for brand awareness |
| Weekly | 25 | Rolling 7d | All | +10 for high-value segments (e.g., VIPs) |
| Lifetime | 100 | Campaign duration | All | N/A |
sha256(email)). Fallback: probabilistic graph (e.g., RampID/LiveRamp).Enforcement: Deny serving if cap exceeded; log for audits.
A centralized Frequency Cap Service (FCS) acts as the single source of truth. Microservices-based, scalable to 10k+ QPS. Use Kafka for events, Redis for real-time, Postgres for persistence.
[Channels: Web/App/CTV/Email/Social/DSP] --> [API Gateway] --> [FCS Core]
|
v
[Identity Resolution (e.g., LiveRamp)] <--> [Redis (Real-time Counts)] <--> [Kafka (Event Bus)]
|
v
[Postgres (Historical/Audit)] <-- [Batch Processor (Daily Rollups)]
Identity Layer:
user_id + confidence score (>80% required).FCS Core (gRPC/REST API):
| Method | Endpoint | Input | Output | Latency Target |
|---|---|---|---|---|
| POST | /check-cap | {user_id, campaign_id, channel, proposed_impressions:1} | {allowed: bool, remaining: int, ttl: int} | <50ms |
| POST | /update-cap | {user_id, impressions:1, timestamp} | {status: ok} | Async |
remaining = policy_max - current_count(window). Query Redis first, fallback to Postgres.Storage:
cap:daily:{user_id}:impressions with timestamp scores). TTL auto-evicts.user_id, channel, window, count, updated_at).cap-check, cap-update for async durability.Integrations:
/check-cap in bid stream.Edge Cases:
Deployment: Serverless (e.g., AWS Lambda for low traffic) + ECS for core.
Verify 99%+ compliance with real-time dashboards and audits.
| Metric | Definition | Target | Tool |
|---|---|---|---|
| Compliance Rate | % of impressions where cap not exceeded | >99.5% | Grafana |
| Cap Headroom | Avg remaining impressions at serve time | >2 | Datadog |
| Overcap Rate | % impressions post-cap (due to latency) | <0.1% | ELK Stack |
| Cross-Channel Lift | % reduction in duplicate reach | 30-50% | BigQuery |
| ROAS Impact | Revenue per user pre/post cap | Neutral/+5% | Mixpanel |
Logging:
/check-cap logs to Kafka: {user_id_hash, decision, remaining, latency}.Dashboards:
SELECT user_segment, AVG(remaining) FROM cap_logs GROUP BY 1.Validation:
Attribution:
This design is production-ready, privacy-compliant, and scales to 1B+ users. Questions, Watson?