Design a user behavior tracking system
Company: Rippling
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Technical Screen
## Problem
Design a **User Behavior Tracking System** that collects and analyzes user events from **mobile and web applications** across multiple products.
## Functional requirements
- Track user behavior events (e.g., page_view, click, purchase) across products.
- Provide **client SDKs** (web + mobile) and **server-side API endpoints** for event collection.
- Support two primary analytics use cases:
1. **Dashboard queries** (interactive): fast response times for common metrics and slices.
2. **Deep analytics / warehousing queries**: complex, ad-hoc queries over large historical data.
- Support **data enrichment**, such as:
- Reverse geolocation from IP/GPS
- Compliance / policy tagging (e.g., PII flags, data residency constraints)
## Non-functional requirements
- **Low latency** for dashboard queries.
- Support **asynchronous** execution for complex analytics queries.
- (Assume typical production needs) reliability, scalability, schema evolution, and access control.
## Deliverables to cover in your design
- High-level architecture and main components.
- Data model / event schema and how you handle schema evolution.
- Ingestion pipeline (SDK → backend) with reliability guarantees.
- Storage choices for dashboard vs warehouse queries.
- Enrichment design (real-time vs batch) and how enriched data is served.
- Key tradeoffs, bottlenecks, and operational concerns (monitoring, data quality, privacy).
Quick Answer: This question evaluates system design and data engineering competencies including distributed event ingestion, client SDK and API design, streaming and batch storage choices, data modeling and schema evolution, enrichment pipelines, and privacy/compliance concerns, and is categorized under System Design and analytics infrastructure.