Designing A/B Tests and Metrics for Subscription Paywalls
Statistics & ExperimentsModel answerLast updated
Define success metrics, instrumentation, experimental framework, and statistical power calculations for testing subscription product changes.
You're working on a subscription-based mobile application. The product team wants to test a change to how users encounter the paywall during onboarding. Currently, users hit a hard gate that blocks content until they subscribe. The proposed variant introduces a 7-day free trial before requiring payment.
Your task is to design the complete experimental framework for this test:
-
Define the metrics hierarchy: What are the primary, secondary, and guardrail metrics? How do you avoid common statistical pitfalls in metric definition?
-
Design the instrumentation: What events need to be logged? What properties should each event capture? Where might data quality issues arise?
-
Specify the experimental setup: How will randomization work? What controls are needed? How long should the test run?
-
Calculate sample size requirements: Given reasonable baseline assumptions, how many users are needed to detect a meaningful effect?
-
Plan for heterogeneous effects: How would you investigate whether the treatment works differently for different user segments? What are the statistical considerations?
-
Establish decision criteria: What conditions must be met before launching the change?
Walk through your reasoning for each component, explaining the statistical principles and practical trade-offs involved.
Hints
Hint 1
Think carefully about denominators in conversion metrics—should you use assigned users or users who started a trial?
Hint 2
Revenue metrics are typically heavy-tailed and underpowered; consider how to handle this in your metric hierarchy.
Hint 3
Don't forget that a 7-day trial means you need to wait for the outcome window to complete before analyzing results.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Model Answer: A/B Test Design for Subscription Paywall
1. Establish Context and Goals
Start by clarifying the business objective. While a free trial typically increases trial sign-ups, it may reduce the conversion rate among trial users. The true goal is increasing net paid subscribers and revenue, not maximizing trial starts.
Key questions to resolve upfront:
- Randomization unit: Individual users (by account or device ID), assigned when they first see the paywall
- Eligible population: New users only; existing subscribers won't be affected
- Outcome horizon: With a 7-day trial and monthly billing, first charges occur around day 7, but meaningful retention signals appear closer to day 37
2. Metrics Hierarchy
Primary Decision Metric:
- 14-day paid conversion rate = (users with successful first charge within 14 days) ÷ (all assigned users)
- Critical: use assigned users as the denominator, not trial starters. Using trial starters creates post-treatment bias since starting a trial is itself affected by treatment
Secondary Metrics:
- Trial initiation rate (explains the mechanism)
- Revenue per assigned user at day 30 (captures plan mix and pricing tiers)
- Day-37 retained subscribers (longer-term signal)
- Note: trial-to-paid rate is descriptive only since its denominator is post-treatment
Guardrail Metrics:
- Refund and chargeback rates
- In-trial cancellation rate
- Customer support volume
- Technical health: paywall load time, crash rates
- Engagement among non-converters (ensures we don't lose future conversion opportunities)
Long-term Consideration: Free trials may attract low-intent users who churn after the first billing cycle. Commit upfront to either maintaining a holdout group or conducting a follow-up measurement at 60-90 days for lifetime value assessment.
3. Instrumentation Plan
Each event should include: user_id, timestamp, platform, app_version, country, experiment_id, variant
Core events:
| Event | Additional Properties | Notes |
|---|---|---|
experiment_assigned | assignment_time | Logged at first paywall encounter |
paywall_displayed | paywall_type, plans_shown, prices, currency | Captures what user actually saw |
trial_initiated | plan_id, trial_duration | User accepted trial |
payment_processed | plan_id, amount, is_initial_charge, payment_method | Server-side only |
subscription_cancelled | days_active, still_in_trial | Captures early exits |
refund_completed | amount, reason_code | From billing system |
renewal_attempt | success_flag, billing_cycle_number | Tracks retention |
Critical implementation details:
- Revenue source of truth: Use server-side billing webhooks (App Store Server Notifications, Google Play Billing, Stripe) exclusively. Client-side events are unreliable
- Exposure vs. assignment: Log exposure separately to analyze only users who actually saw the treatment
- Pre-launch validation: Run an A/A test to verify event volumes and reconcile with finance data
- Sample Ratio Mismatch monitoring: Daily chi-square tests on assignment ratios; significant SRM invalidates results
4. Experimental Design
Randomization approach:
- 50/50 split using deterministic hashing:
variant = hash(user_id + experiment_salt) % 2 - Stratify by platform (iOS/Android) since billing flows differ substantially
Timeline structure:
- Enrollment period: Minimum 14 days to capture weekly patterns
- Maturation window: Additional 14 days after enrollment closes so all users complete their outcome window
- Total duration: ~28 days minimum
Key controls:
- Pre-register hypothesis, primary metric, minimum detectable effect (MDE), significance level (α=0.05), and planned subgroup analyses
- If continuous monitoring is required, use sequential testing methods (mSPRT or alpha spending functions) to control Type I error
- Apply CUPED (Controlled-experiment Using Pre-Experiment Data) for variance reduction using pre-exposure covariates: acquisition channel, pre-paywall engagement, device characteristics. Expect 10-30% variance reduction
- Monitor for interference: family plan sharing, concurrent pricing experiments
5. Sample Size Calculation
Assumptions:
- Baseline 14-day paid conversion: p₁ = 10%
- Target detection: 1 percentage point absolute lift (p₂ = 11%, or 10% relative lift)
- Two-sided α = 0.05, power (1-β) = 80%
Formula for proportions:
n = [(z₁₋α/₂ + z₁₋β)² × [p₁(1-p₁) + p₂(1-p₂)]] / (p₂ - p₁)²
Plugging in values: n = [(1.96 + 0.84)² × (0.09 + 0.0979)] / (0.01)² n ≈ 14,700 per arm, or 29,500 total users
Timeline translation:
- At 3,000 eligible new users/day: ~10 days enrollment → round to 14 days for weekly patterns
- Add 14-day maturation window
- Total experiment duration: ~28 days
Adjustments:
- CUPED with 20% variance reduction → ~20% fewer users needed
- Revenue per user requires larger samples due to heavy-tailed distribution; use winsorization or consider it secondary
- Subgroup analysis requires roughly n per segment, multiplying required runtime
6. Heterogeneous Treatment Effects Analysis
Pre-specified segments:
- Platform (iOS vs. Android)
- Geographic region or price tier
- Acquisition channel (paid vs. organic)
- Pre-paywall engagement level
Statistical approach:
- Fit regression with interactions:
converted ~ treatment × segment + covariates - Test interaction terms, not separate per-segment p-values (common mistake: "significant in A but not B" doesn't prove difference)
- Apply multiple testing corrections: Benjamini-Hochberg or Bonferroni across planned segments
- Treat unplanned segments as exploratory, requiring validation in a follow-up test
Advanced methods:
- Causal forests or meta-learners (S-learner, T-learner, X-learner) can estimate conditional average treatment effects (CATE)
- Use honest splitting or cross-validation to prevent overfitting
- If meaningful heterogeneity is found (e.g., trial helps organic users but hurts paid acquisition), propose targeted rollout and validate with a new experiment before shipping
7. Decision Framework
Ship the free trial if:
- Primary metric shows statistically significant improvement (p < 0.05)
- Effect size is practically meaningful (hit MDE or better)
- No significant guardrail degradation
- Secondary metrics align with primary metric story
- No severe heterogeneity that would harm key segments
- Long-term commitment to LTV monitoring post-launch
Common Mistakes to Avoid:
- Using post-treatment denominators (e.g., "conversion among trial starters")
- Peeking at results without sequential testing correction
- Comparing p-values across segments instead of testing interactions
- Ignoring long-term churn risk from low-intent trial users
- Relying on client-side revenue events instead of server-side billing data
- Failing to account for weekly seasonality in enrollment period
- Not pre-registering the analysis plan, leading to p-hacking
The key principle throughout is maintaining causal interpretation: every metric denominator should be defined at or before randomization to avoid selection bias.