As asked
Walk me through how you would instrument a mobile app for product analytics. Cover what events to log, how to log them, and how to keep the schema sane.
Sample answer outline
Define a small set of high-value events (signup_completed, feature_used, purchase_completed) tied to product outcomes, not every tap. Use a strongly typed event schema: define events as code, share types between mobile and the analytics backend. Batching: queue events locally, flush in batches on a timer or on app background. Offline support: persist queued events through process restarts. Privacy: respect ATT on iOS, do not log PII. Validate in CI: a test that exercises a user flow and checks the expected events fire with the expected fields.
Expect these follow-ups
- How do you stop the event schema from rotting over time?
- What do you do with events that fire offline and arrive a week late?
- When would you not use a third-party SDK and instead write your own?