Metric Definition and Implementation Questions

Defining and computing business metrics correctly: single-source-of-truth metric definitions, handling edge cases (dedup, attribution windows, timezones), and reconciling real-time vs batch metric values. Covers metric governance and translating business questions into precise, reproducible calculations. A high-frequency analytics-interview topic.

MediumTechnical
62 practiced

You're asked to create a clear, auditable definition for the metric 'Active User (DAU)' for an e-commerce web and mobile product used by both signed-in and anonymous users. Specify: the user identifier(s) to use, which events count as activity, the time window, deduplication rules (e.g., same user across devices), how to treat bots/test accounts, and how to document the definition so stakeholders can reproduce it.

MediumTechnical
61 practiced

You must choose between COUNT(DISTINCT user_id) and approximate distinct algorithms like HyperLogLog (HLL) for unique-user counts in dashboards. Explain the trade-offs in accuracy, memory and compute cost, mergeability across partitions, and scenarios where HLL is appropriate. Provide thresholds or heuristics you would use in a production environment.

HardTechnical
112 practiced

Write SQL to compute time-decay multi-touch attribution over the last 30 days. Schema: touches(user_id, touch_time TIMESTAMP, channel STRING, is_conversion BOOLEAN, conversion_time TIMESTAMP). Assign weight to each touch for a conversion as exp(-lambda * days_before_conversion) and normalize weights per conversion. Provide the SQL approach and explain normalization.

MediumTechnical
73 practiced

You are designing a minimal 'metrics' registry table to store canonical metric definitions and metadata for cross-team use. Provide a sample schema (columns and types) and explain three additional fields you would add to support lineage, ownership, and versioning. You may use SQL-style column definitions in your answer.

HardTechnical
117 practiced

Propose an approach to attribute conversions across devices using deterministic and probabilistic matching. Identify the signals you would use for each approach and why, outline matching algorithms, confidence scoring, privacy implications, and validation methods for matching accuracy.

Unlock Full Question Bank

Get access to all Metric Definition and Implementation interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.