Situation: We’re running an A/B experiment to personalize push/email notifications and must define KPIs, detect harms (churn, spam complaints), set statistical thresholds, and put post-launch regression detection in place.Clarifying questions:- Business goal: lift what? DAU, conversion, retention, revenue per user?- Targeting scope: all users or a segment? Frequency caps and channels?- Expected treatment behavior: different message content, timing, or send probability?- Risk tolerance: acceptable uplift tradeoffs vs. churn/spam?- Available data latency and instrumentation (real-time vs batch)?Engagement metrics (primary + guardrails):- Primary KPI: 7-day active conversion rate (users who opened and completed target action within 7d).- Secondary KPIs: click-through rate (CTR), open rate, session starts per user, time-to-action.- Engagement depth: avg events per DAU, feature-specific events.Negative side-effects to monitor:- Short-term: opt-outs/unsubscribes rate, spam complaints, increase in “do not disturb” toggles.- Medium-term: 28-day retention, churn rate, revenue churn, support tickets.- Behavioral churn signals: decreased session frequency, longer inter-session time.Statistical thresholds & analysis:- Minimum Detectable Effect (MDE) computed per KPI given baseline, alpha=0.01 for guardrail metrics (more stringent), alpha=0.05 for primary, power=0.8. Use sequential testing correction (alpha spending, e.g., O’Brien-Fleming) if peeking.- Use uplift with covariate adjustment (e.g., CUPED) to reduce variance.- Test types: two-sided for engagement, one-sided for expected improvements; non-parametric bootstrap for skewed metrics (revenue).Regression detection & alerting post-launch:- Real-time / daily monitoring pipeline with: - Dashboards tracking primary + guardrails by cohort, country, channel. - Automated statistical checks: compare rolling 7-day windows to pre-launch baseline using z-tests or permutation tests; flag if effect crosses threshold and persists >48 hours. - Health checks: sudden jump in opt-outs > X SDs or relative increase > Y% triggers pager + kill-switch workflow.- Post-launch rollback criteria: significant harm on any guardrail (alpha-adjusted) sustained for 48-72 hours or major revenue impact.- Root-cause tooling: ability to slice by user cohort, device, channel, message template; store event-level logs for quick replay.Implementation sketch (sample SQL for daily CTR check):sql
-- daily CTR by cohort
SELECT
cohort,
SUM(clicks)::float / NULLIF(SUM(impressions),0) AS ctr,
COUNT(DISTINCT user_id) as users
FROM notification_events
WHERE event_date BETWEEN current_date-7 AND current_date-1
GROUP BY cohort;
Key rationale:- Combine primary conversion with engagement depth to avoid optimizing superficial signals.- Use strict guardrail thresholds and sequential-corrected tests to avoid false positives from peeking.- Automate detection with clearly defined escalation and rollback to limit user harm while enabling rapid learning.