Conversion Funnel Optimization Questions
Analyzing and improving a bounded, ordered conversion path: mapping the sequence of steps a user takes from acquisition through one terminal conversion or activation event (signup, first purchase, first paid order, trial-to-paid, onboarding to first-success), computing step-to-step and overall conversion rates and drop-off, and diagnosing where and why users fall out. Covers the SQL and query techniques for computing funnel metrics at scale (stage-by-stage conversion tables, time-to-conversion and time-to-first-value, cohort LTV measured within a funnel window, path analysis across non-linear user journeys, event instrumentation and data-quality practices for funnel tracking), attribution modeling for crediting conversions across channels and touchpoints (first-touch, last-touch, linear, time-decay, Markov-chain, and Shapley-value approaches) and customer acquisition cost by channel, and the experiment design and statistics used to validate funnel changes (A/B and multi-armed-bandit test design, sample-size and power calculations, quasi-experimental methods such as difference-in-differences and synthetic control when randomization is not possible, and testing whether a single funnel-stage drop is a real, statistically significant shift rather than noise). Also covers diagnosing UX and flow friction that causes drop-off (checkout, signup, and onboarding friction points) and prioritizing a program of funnel-improvement experiments (impact and effort frameworks such as RICE or ICE, guardrail metrics, roadmap sequencing). Distinct from User Retention and Engagement, which covers what an already-converted or already-activated user does afterward: repeat usage over time, cohort retention curves, DAU/WAU/MAU, churn, and reactivation. A question belongs here if it concerns a user's first, bounded pass toward one conversion or activation event; it belongs to User Retention and Engagement if it concerns recurring behavior after that event. General-purpose rolling-window anomaly and change-point detection techniques (CUSUM, Bayesian change-point, seasonality-aware baselines) for monitoring any metric over time belong to the companion topic Advanced SQL: Metric Monitoring, Anomaly Detection, and Data Correctness at Scale, not here.
Explain the difference between drop-off and churn in product analytics. Provide three quantitative definitions or SQL-like pseudocode for each term (for example: time-based, activity-based, cohort-based definitions), and explain in which business scenarios each definition is most appropriate.
Sample Answer
Direct answer
Drop-off is a user failing to advance to the NEXT step of a bounded, ordered sequence they already entered; churn is an already-engaged, already-converted user ceasing to use the product over an OPEN-ended, recurring relationship. Both concepts can be defined three distinct ways, time-based, activity-based, and cohort-based, and the six resulting definitions below are genuinely different measurements, not restatements of each other: time-based definitions use a fixed clock window, activity-based definitions use behavior itself (a session boundary or a specific action) rather than a fixed window, and cohort-based definitions aggregate to a group-level rate rather than flagging individuals.
Structured elaboration
The six required definitions, drop-off first, then churn, each with SQL-like pseudocode:
| # | Term | Definition type | Definition |
|---|---|---|---|
| 1 | Drop-off | Time-based | A user who reached funnel step N but did not reach step N+1 within a fixed window (hours to days) after reaching N |
| 2 | Drop-off | Activity/session-based | A user whose SESSION containing step N ended (via an inactivity gap) without a step N+1 event occurring in that same session |
| 3 | Drop-off | Cohort-based | The percentage of a cohort (users who reached step N within a given period) that did not reach step N+1 by the reporting cutoff |
| 4 | Churn | Time-based | A user with no product-usage event at all for a fixed, long window (commonly 30, 60, or 90 days) |
| 5 | Churn | Activity/behavioral-based | A user who stopped performing a SPECIFIC core/key action, even if they still log in occasionally, or whose usage frequency is on a declining trend toward zero |
| 6 | Churn | Cohort-based | The percentage of a signup or subscription cohort no longer active (or, for subscriptions, no longer paying) as of a given month mark; for contractual products this can be an EXPLICIT event (cancellation), not just inferred from absence |
Definition 1, drop-off, time-based (SQL-like pseudocode):
SELECT user_id
FROM step_n_events sn
WHERE NOT EXISTS (
SELECT 1 FROM step_n1_events sn1
WHERE sn1.user_id = sn.user_id
AND sn1.event_ts BETWEEN sn.event_ts AND sn.event_ts + INTERVAL '7 days'
);
Definition 2, drop-off, activity/session-based (SQL-like pseudocode):
-- session_id assigned upstream via a 30-minute inactivity-gap rule
SELECT sn.user_id, sn.session_id
FROM step_n_events sn
WHERE NOT EXISTS (
SELECT 1 FROM step_n1_events sn1
WHERE sn1.user_id = sn.user_id AND sn1.session_id = sn.session_id
);
Definition 3, drop-off, cohort-based (SQL-like pseudocode):
SELECT cohort_week,
COUNT(DISTINCT n.user_id) AS reached_step_n,
COUNT(DISTINCT n1.user_id) AS reached_step_n1,
1.0 - COUNT(DISTINCT n1.user_id) / COUNT(DISTINCT n.user_id) AS dropoff_rate
FROM step_n_events n
LEFT JOIN step_n1_events n1 ON n1.user_id = n.user_id
GROUP BY cohort_week;
Definition 4, churn, time-based (SQL-like pseudocode):
SELECT user_id, MAX(event_ts) AS last_active_ts
FROM all_usage_events
GROUP BY user_id
HAVING MAX(event_ts) < CURRENT_DATE - INTERVAL '30 days';
Definition 5, churn, activity/behavioral-based (SQL-like pseudocode):
SELECT user_id
FROM key_action_events
GROUP BY user_id
HAVING MAX(event_ts) < CURRENT_DATE - INTERVAL '14 days'
-- the window for the CORE action is often shorter than the general
-- inactivity window in definition 4, since a user can still be logging in
-- (satisfying definition 4's activity bar) while having quietly stopped
-- doing the thing that actually signals engagement
;
Definition 6, churn, cohort-based (SQL-like pseudocode):
SELECT signup_cohort_month,
COUNT(DISTINCT CASE WHEN subscription_status = 'canceled' THEN user_id END)
AS churned_users,
COUNT(DISTINCT user_id) AS cohort_size,
1.0 * COUNT(DISTINCT CASE WHEN subscription_status = 'canceled' THEN user_id END)
/ COUNT(DISTINCT user_id) AS cohort_churn_rate
FROM subscriptions
GROUP BY signup_cohort_month;
The conceptual differences that make these genuinely two different phenomena, not the same idea at two scopes. Drop-off's time windows are short (hours to a few days), because it measures failure to complete a BOUNDED sequence that is supposed to happen close together in time. Churn's time windows are long (weeks to months), because it measures disengagement from an OPEN-ended, ongoing relationship with no natural next step to fail at. Drop-off has no EXPLICIT "I am dropping off" event, it is always inferred from the absence of the next step; churn, for contractual/subscription products, sometimes DOES have an explicit event (a cancellation), which is a fundamentally more reliable signal than any inactivity-based inference, since it removes the guesswork of picking a threshold.
Worked example
A concrete scenario where picking the wrong one of the three definition types for CHURN specifically produces a materially different number: a B2C app with 10,000 users in a signup cohort. Using time-based churn (no usage event in 30 days): 2,200 users churned (22%). Using activity-based churn (no CORE action, defined as creating content, in 14 days, even though many of these users still opened the app to browse): 3,600 users churned (36%), a meaningfully higher rate, because it catches users who are technically still "active" by a login-based definition but have functionally disengaged from the product's actual value. Using cohort-based subscription churn (only counting users who explicitly canceled a paid plan): 850 users churned (8.5%), the lowest of the three, because it only counts the subset of the 10,000 who were even ON a paid plan to begin with and explicitly canceled, silently excluding free users who quietly stopped using the product without ever having a plan to cancel. All three numbers are "correct" by their own definition; reporting any one of them as "the churn rate" without naming which definition produced it is how two teams end up in a meeting disagreeing about a number that was never actually the same metric.
Trade-offs and pitfalls
- Which definition fits which business scenario. Time-based drop-off is the right tool for near-real-time funnel-step debugging and A/B test monitoring, since it produces a fast, individual-level signal. Activity/session-based drop-off is the right tool for diagnosing single-session UX friction, where the steps are supposed to happen back-to-back. Cohort-based drop-off is the right tool for trend reporting and cross-segment comparison on a dashboard, not for real-time alerting on any one user. Time-based churn is the right tool for triggering simple, automatable re-engagement campaigns (a "we miss you" email at day 30). Activity/behavioral churn is the right tool for early-warning and predictive churn modeling, catching disengagement before the harder time-based threshold fires, especially valuable in B2B contexts where a customer-success team wants to intervene before a renewal decision, not after. Cohort-based churn (particularly the explicit, contractual version) is the right tool for board-level revenue reporting (MRR, monthly recurring revenue, churn and logo churn), since it ties directly to realized revenue impact rather than an inferred behavioral proxy.
- Common mistake: picking a single churn threshold (30 days) and applying it uniformly across products with very different natural usage cadences. A daily-habit product (a messaging app) genuinely churning at 30 days of inactivity is a different signal than a quarterly-use product (a tax-filing app) where 30 days of inactivity is completely normal and says nothing about disengagement; the threshold should be calibrated against the product's own typical usage rhythm, not borrowed from a different product category.
- Drop-off definitions inferred purely from absence carry irreducible ambiguity that an explicit churn-cancellation event does not. A user who "dropped off" at checkout might complete the purchase tomorrow, a week from now, or never; without a hard cutoff, EVERY drop-off number is provisional until enough time has passed, exactly the right-censoring problem familiar from survival analysis: an observation whose true outcome has not yet occurred by the measurement cutoff is neither a confirmed success nor a confirmed failure, only not yet resolved.
SQL challenge (hard): Given events: first_touch(user_id, first_touch_at TIMESTAMP) and conversions(user_id, conversion_at TIMESTAMP), write an efficient SQL (assume BigQuery or Postgres with analytic functions) to compute median time-to-conversion (in hours) for each monthly acquisition cohort. Explain performance considerations for large datasets.
Sample Answer
Direct answer
Join every user's first touch to their (possibly absent) conversion, bucket by the calendar month of first touch, and compute the median of the conversion-time gap in hours using a native percentile function (MEDIAN or PERCENTILE_CONT(0.5), both available in BigQuery and Postgres-family engines including DuckDB); the part most answers get wrong is censoring, users with a first touch but no matching conversion must be excluded from the median computation (their time-to-conversion is undefined, not infinite or zero) while still being counted in the cohort's size and reported conversion rate, so the median is never silently computed over a biased, converters-only view without saying so.
Structured elaboration
Cohort definition. date_trunc('month', first_touch_at) groups users by the calendar month their first touch occurred, giving a fixed cohort assignment per user, independent of whether or when they ever convert.
Computing the gap. For users who do have a conversion row, the gap in hours is EXTRACT(EPOCH FROM (conversion_at - first_touch_at)) / 3600.0; EPOCH here means the timestamp difference expressed in seconds, the standard way to get a precise sub-day duration out of a timestamp subtraction across both BigQuery and Postgres-family engines.
Censoring, handled explicitly, not implicitly. A LEFT JOIN from first_touch to conversions is the correct join direction, since every first-touch user belongs in the cohort regardless of outcome; for a user with no matching conversion row, the gap expression naturally evaluates to NULL. Both MEDIAN() and COUNT(column) (as opposed to COUNT(*)) ignore NULL values by standard SQL aggregate semantics, so the median is automatically computed only over users who actually converted, which is correct, PROVIDED the query also reports the cohort's total size and conversion rate alongside the median so nobody downstream mistakes "median time-to-conversion among converters" for "median time-to-conversion for the whole cohort," two different and easily conflated claims. This is the single most important design decision in this query: silently dropping non-converters from the join entirely (an INNER JOIN instead of LEFT JOIN) would compute the same median number but hide the fact that a meaningful share of the cohort never converted at all.
Performance considerations for large datasets. MEDIAN and PERCENTILE_CONT are fundamentally different from SUM or COUNT: computing an exact percentile requires the engine to see every value in sorted order within its group, an O(nlogn) operation per group, rather than a single streaming pass. At real event-stream scale (many millions of users per cohort), this becomes a real cost, and the standard production mitigations are: use an approximate percentile function where the engine offers one (APPROX_QUANTILE in several warehouse engines, backed by a mergeable sketch such as a t-digest or similar structure), which trades a small, bounded amount of accuracy for a computation that is close to linear and far more memory-efficient at scale; materialize and incrementally maintain a small per-user (user_id, cohort_month, hours_to_convert) table from the raw event streams, rather than recomputing the full join and extraction against raw first-touch and conversion events on every query; and ensure the underlying tables are partitioned or clustered by the cohort date so a query scoped to a specific month's cohort does not need to scan unrelated months' data at all. Whether exact or approximate percentiles are used should be a stated, deliberate choice tied to how the number will be used (an executive trend line can typically tolerate an approximate percentile; a number feeding a financial or compliance report usually cannot), not a default picked without considering the trade-off.
Worked example
Schema: first_touch(user_id, first_touch_at TIMESTAMP), conversions(user_id, conversion_at TIMESTAMP). Run in DuckDB (chosen specifically because it has native MEDIAN/PERCENTILE_CONT, unlike SQLite):
WITH joined AS (
SELECT
f.user_id,
date_trunc('month', f.first_touch_at) AS cohort_month,
CASE
WHEN c.conversion_at IS NOT NULL
THEN EXTRACT(EPOCH FROM (c.conversion_at - f.first_touch_at)) / 3600.0
END AS hours_to_convert
FROM first_touch f
LEFT JOIN conversions c ON c.user_id = f.user_id
)
SELECT
cohort_month,
COUNT(*) AS cohort_size,
COUNT(hours_to_convert) AS converted_count,
ROUND(COUNT(hours_to_convert) * 100.0 / COUNT(*), 1) AS conversion_rate_pct,
ROUND(MEDIAN(hours_to_convert), 2) AS median_hours_to_convert
FROM joined
GROUP BY cohort_month
ORDER BY cohort_month;
Pinned data: 10 users, 5 per monthly cohort (January and February), each cohort containing 4 converters at varied hours-to-convert values and 1 user with no conversion row at all (users 5 and 10, the censored cases).
CREATE TABLE first_touch (user_id INTEGER, first_touch_at TIMESTAMP);
CREATE TABLE conversions (user_id INTEGER, conversion_at TIMESTAMP);
INSERT INTO first_touch VALUES
(1,'2024-01-01 00:00:00'),(2,'2024-01-01 00:00:00'),(3,'2024-01-01 00:00:00'),
(4,'2024-01-01 00:00:00'),(5,'2024-01-01 00:00:00'),
(6,'2024-02-01 00:00:00'),(7,'2024-02-01 00:00:00'),(8,'2024-02-01 00:00:00'),
(9,'2024-02-01 00:00:00'),(10,'2024-02-01 00:00:00');
INSERT INTO conversions VALUES
(1,'2024-01-01 06:00:00'), -- 6h
(2,'2024-01-02 00:00:00'), -- 24h
(3,'2024-01-02 00:00:00'), -- 24h
(4,'2024-01-11 00:00:00'), -- 240h
-- user 5: no conversion row at all (censored)
(6,'2024-02-01 12:00:00'), -- 12h
(7,'2024-02-02 00:00:00'), -- 24h
(8,'2024-02-01 12:00:00'), -- 12h
(9,'2024-02-02 00:00:00'); -- 24h
-- user 10: no conversion row at all (censored)
Output (actually executed, DuckDB):
cohort_month | cohort_size | converted_count | conversion_rate_pct | median_hours_to_convert
2024-01-01 00:00:00 | 5 | 4 | 80.0 | 24.0
2024-02-01 00:00:00 | 5 | 4 | 80.0 | 18.0
The January cohort's four converted users took 6, 24, 24, and 240 hours; sorted, the middle two values (24 and 24) average to a median of exactly 24.0, matching the printed result. The February cohort's converters took 12, 24, 12, and 24 hours; sorted [12, 12, 24, 24], the middle two average to 18.0, also matching. Both cohorts report cohort_size = 5 and conversion_rate_pct = 80.0, confirming the censored user in each cohort was correctly counted toward cohort size and conversion rate while correctly excluded from the median calculation itself; separately querying MEDIAN(hours_to_convert) and PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY hours_to_convert) side by side on the same data confirmed both functions agree exactly and both ignore the NULL (censored) rows.
Complexity
The join itself is O(F+C) where F and C are the sizes of the first_touch and conversions tables, assuming an index or clustering on user_id for both. The per-cohort median requires sorting each cohort's converted-user gaps, O(mlogm) per cohort where m is that cohort's converter count, an unavoidable cost for an exact percentile unless an approximate, sketch-based function is substituted as discussed above.
Edge cases
- Censored (never-converted) users, the case this whole design is built around: handled by the
LEFT JOINplusNULL-producingCASEexpression, verified explicitly in the worked example (users 5 and 10 counted incohort_sizebut excluded frommedian_hours_to_convert, withconversion_rate_pctmaking the exclusion visible rather than silent). - A negative or implausibly small gap (a
conversion_atearlier than its ownfirst_touch_at, a real data-quality possibility from clock skew or a backfilled event with the wrong timestamp): worth an explicit guard (WHERE c.conversion_at IS NULL OR c.conversion_at >= f.first_touch_at) so a data error does not silently corrupt the median with a nonsensical negative value. - A cohort with zero converters at all:
COUNT(hours_to_convert)correctly returns 0 andMEDIAN(hours_to_convert)correctly returnsNULLrather than erroring, which should be handled explicitly in any downstream reporting layer (distinguishing "no data yet" from "0 hours") rather than defaulting to a misleading zero.
A related but distinct variant: per-step, not end-to-end, timing
The same median/percentile machinery extends directly to a genuinely different, harder question worth naming explicitly: rather than one end-to-end gap from first touch to conversion, compute the average (or median) time BETWEEN each pair of consecutive funnel steps for users who have a full, multi-step event sequence. Two considerations specific to this variant that do not arise in the single-gap version above: outlier handling, a per-step gap has a much longer realistic tail than an end-to-end conversion gap (a user can sit on one step for weeks before returning), so a mean-based aggregate is far more outlier-sensitive here than a median is, and even the median benefits from an explicit cap or exclusion rule (winsorizing gaps beyond a chosen percentile, or excluding sessions inactive beyond a defined engagement window, stated explicitly as a modeling choice, not silently baked into the query); and midnight/day-boundary handling, computing step-to-step elapsed time must use the full timestamp difference (as this answer does throughout), never a DATE()-truncated day-difference, since two timestamps 90 minutes apart that happen to straddle local midnight would show a spurious "1 day" gap under naive date-truncated arithmetic despite the real elapsed time being under two hours; storing and computing entirely in UTC (or at minimum a single, consistently applied timezone) avoids a second, related failure mode where users in different timezones get inconsistently bucketed "same day" or "next day" for what is actually the same elapsed duration.
Trade-offs and pitfalls
MEDIAN/PERCENTILE_CONTsupport and exact syntax vary meaningfully by engine (this answer's SQL runs as shown on DuckDB and Postgres-family engines; BigQuery usesAPPROX_QUANTILEby default and requiresPERCENTILE_CONTinside anOVERwindow clause rather than as a plain aggregate, and SQLite has neither natively), so "assume BigQuery or Postgres with analytic functions," as the question specifies, is doing real work; verify the target engine's exact percentile syntax rather than assuming a single form is universal.- The single biggest correctness risk in this whole query shape is an accidental
INNER JOIN(or an equivalentWHERE conversion_at IS NOT NULLfilter applied too early) silently converting a censored population into a converters-only one; the median number produced would look completely plausible while quietly answering a different, easily-conflated question. - Choosing exact versus approximate percentiles is a real, statable trade-off, not a default; report which was used alongside the number, since a stakeholder comparing this month's median against last month's needs to know both were computed the same way.
- A common mistake specific to the per-step variant is reusing this query's exact aggregation logic unchanged and only swapping the column names, without separately addressing outlier and timezone handling, both of which matter far more for step-to-step gaps than for the single end-to-end gap this base query computes.
You observe a marketing channel shows large conversion increases for a cohort, but you're concerned about confounding factors. Describe analyses and diagnostics you would run to detect selection bias, seasonality, or other confounders, and how you would adjust your estimate (e.g., weighting, matching, placebo tests).
Sample Answer
Direct answer
A channel's raw conversion lift is confounded whenever exposure to it was not randomly assigned, which is almost always true of observational channel data, so before crediting the channel with a causal effect, run diagnostics for the three usual suspects, selection bias (who got exposed), seasonality (when the lift appeared), and other concurrent confounders (what else changed at the same time), and once a specific one is implicated, adjust the estimate with weighting, matching, or a placebo test depending on what exactly needs correcting.
Structured elaboration
Selection bias. The cohort that ended up exposed to the channel is systematically different from the cohort that did not, in ways related to the outcome itself, not just to the channel. A common concrete case: the channel targets warm leads or a lookalike audience built from past converters, so its exposed group was already more likely to convert before the channel ever touched them. Diagnostic: compare the exposed and unexposed cohorts' characteristics and, critically, their PRE-exposure baseline conversion rate; if the exposed group already converted better before the channel launched, that gap is evidence of selection, not of the channel's effect.
Seasonality. Conversion moves on its own calendar rhythm, day-of-week, a holiday season, a promotional calendar unrelated to this specific channel, and that rhythm can coincide with the channel's spend ramp by accident. Diagnostic: compare the exposed cohort's lift against the same period's movement in a comparable unexposed cohort, or against overall site-wide conversion; if everything moved together across cohorts that never saw the channel, a shared calendar effect is implicated instead of the channel.
Other confounders. Any third factor influencing both who got exposed and how likely they were to convert: a concurrent product launch, a competitor's outage, a parallel pricing promotion, a broad demand shift. Diagnostic: cross-reference the lift's timing against a change log or launch calendar for anything else that shipped in the same window, and check whether the "lift" also shows up in metrics the channel could not plausibly influence; a lift appearing broadly across unrelated funnels or products points at a shared external driver, not a channel-specific effect.
Adjustment methods, named as asked, mechanism and when to use each:
| Method | How it works | When to use it | Key risk |
|---|---|---|---|
| Weighting (inverse propensity weighting) | Estimate each unit's propensity to be exposed from its covariates, then reweight the comparison group so its weighted covariate distribution matches the exposed group's | Good covariate data on what drives exposure; want to keep full sample size rather than discard units | Corrects only for confounders actually measured and included; extreme propensity scores near 0 or 1 inflate weight variance |
| Matching | For each exposed unit, find one or more unexposed units with similar covariate (or propensity-score) values and compare outcomes only within matched sets | Want an intuitive, auditable comparison and distrust the functional-form assumptions a regression or weighting approach requires | Same measured-confounders-only limit as weighting; a loose match reintroduces the bias it was meant to remove |
| Placebo test | Re-run the identical lift analysis somewhere it should show no effect: a fake treatment date before the channel launched, or a metric or segment the channel could not plausibly move | As a sanity check on any observational causal claim; cheap, and it can falsify an analysis rather than only support one | A passed placebo test rules out that specific alternative explanation, it does not prove the remaining effect is genuinely causal |
Worked example
Weighting, with hand-computed numbers. Suppose users split into two propensity strata by prior purchase history, "high" and "low." In the exposed group, 70 percent of users are high-propensity (converting at 20 percent) and 30 percent are low-propensity (converting at 4 percent):
0.7×20%+0.3×4%=14%+1.2%=15.2%
In the unexposed group the composition is inverted, only 30 percent high-propensity, 70 percent low, with similar within-stratum rates (18 percent and 3 percent):
0.3×18%+0.7×3%=5.4%+2.1%=7.5%
The naive comparison, 15.2 percent versus 7.5 percent, is a 7.7-point gap that looks like a large channel effect. But most of that gap is composition: the exposed group simply contains far more of the users who convert well regardless of the channel. Reweighting the unexposed group to the exposed group's composition (apply the exposed group's 70/30 mix to the unexposed group's own within-stratum rates):
0.7×18%+0.3×3%=12.6%+0.9%=13.5%
The adjusted comparison is now 15.2 percent versus 13.5 percent, a 1.7-point gap, versus the naive 7.7-point gap: roughly three quarters of the apparent lift was compositional imbalance, not a channel effect.
Placebo test, with hand-computed numbers. Suppose the exposed cohort converts at 8 percent in the post-period against 5 percent for the unexposed cohort, a naive 3-point lift. Before trusting that number, run the identical comparison on the pre-period, before the channel existed: exposed 6 percent, unexposed 4 percent, a 2-point gap that predates the channel entirely and is direct evidence of a pre-existing difference between these two cohorts (selection bias). Netting the pre-period gap out of the post-period gap, the same difference-in-differences arithmetic used for a designed quasi-experiment, applied here as a diagnostic rather than a planned design:
(8%−6%)−(5%−4%)=2%−1%=1%
The genuine, confounder-adjusted lift is closer to 1 point, not the naive 3. The placebo test did its job: it caught that most of the naive lift was a pre-existing gap between the two cohorts, not something the channel produced.
Trade-offs and pitfalls
- All three methods only correct for what you can see or that shows up in the pre-period. Weighting and matching adjust for measured covariates; a genuinely unmeasured confounder (a sales rep manually reaching out to accounts that also happen to fall inside this channel's targeting) is invisible to either. A placebo test can catch a confounder that produces a spurious pre-period gap, but not one that only appears after the channel launched and mimics its timing exactly. Real unmeasured confounding is what an instrumental-variable approach or an actual randomized design exists to solve instead.
- Common mistake: running one diagnostic and declaring the effect confirmed. A clean covariate-balance check does not rule out seasonality, and a clean placebo test at one date does not rule out a different, later confounder. Each diagnostic only rules out one class of failure, so use several, not one, before trusting the estimate.
- Common mistake: treating a passed placebo test as proof, not a failed falsification attempt. A placebo test that shows a spurious effect is strong, direct evidence against the causal claim; a placebo test that shows nothing is necessary support for the claim, not sufficient proof of it.
- Weighting-specific pitfall: propensity scores near 0 or 1 produce very large weights that let a handful of units dominate the estimate; trim or cap extreme weights and check the effective sample size after weighting, not just the raw count before it.
- Matching-specific pitfall: a close match on the wrong covariates (matching on demographics when the real confounder is browsing behavior) creates a false sense of rigor without removing the actual bias; matching only helps to the extent the matched covariates are the ones truly driving both exposure and outcome.
Your freemium product converts 2% of free users to paid. Propose a prioritized sequence of product changes and experiments you would run over 6 months to move conversion to 5%. For each experiment include hypothesis, primary metric, and success threshold.
Sample Answer
Direct answer
Moving free-to-paid conversion from 2% to 5% is a 150% relative increase, too large to bet on any single test, so the right deliverable is a sequenced, 6-month roadmap of experiments, front-loaded with the highest-confidence, lowest-effort changes to build early evidence and momentum, escalating toward bigger, riskier swings once the cheap wins are exhausted. Every experiment in the sequence needs its own stated hypothesis, primary metric, and success threshold, and the roadmap as a whole needs an honest, explicit check on whether the cumulative target is actually achievable in the stated window, which is a distinct and necessary part of the answer, not just the list of experiments itself.
Structured elaboration
Why sequencing, not just a list, matters. Running experiments in priority order rather than in parallel or arbitrary order does two things a flat list does not: it lets each experiment's real result inform whether the next one's underlying assumption still holds (an onboarding-friction fix that under-performs suggests the team's theory of what's blocking conversion needs revision before investing in a bigger, related bet), and it produces early, credible wins that justify continued investment in the later, more expensive experiments to skeptical stakeholders.
Sequencing logic used below. Early months prioritize changes that are cheap to build, fast to measure, and target a well-understood friction point (signup and first-session experience) where a positive result is likely and the downside of a negative result is small. Later months escalate to changes that require more engineering investment, take longer to reach a valid read (a trial-length experiment cannot conclude faster than the trial itself), or touch acquisition mix rather than only in-product behavior. This is the same confidence-versus-effort logic behind formal prioritization frameworks like RICE (reach, impact, confidence, effort) or ICE (impact, confidence, ease); here that logic is applied directly to produce an ordering, not re-derived as its own separate framework.
Alternative ways to arrive at a similar sequence, worth naming briefly. The same prioritized-experiment-sequence approach applies directly if the target metric were a B2B activation rate moving from 20% to 35% instead of a freemium-to-paid rate moving from 2% to 5%: the sequencing LOGIC (cheap and high-confidence first, expensive and uncertain later) does not change, only the specific experiments shift toward B2B-relevant activation levers (a guided admin setup wizard, a dedicated onboarding call for larger accounts) instead of freemium in-product prompts. A second, equally valid way to derive a sequence is customer-journey mapping: lay out every touchpoint from signup through billing (signup, first login, first key action, the upgrade moment, checkout) and design one experiment per touchpoint, rather than ranking by confidence and effort; this tends to produce a similar set of experiments organized by WHERE in the journey they sit rather than by WHEN to run them, which is a useful alternate lens when communicating the roadmap to stakeholders who think in journey stages.
Worked example
| Month | Experiment | Hypothesis | Primary metric | Success threshold |
|---|---|---|---|---|
| 1 | Contextual, usage-triggered upgrade prompt (replacing a generic "Upgrade" navigation link with a prompt shown when a user hits a specific usage limit) | Prompting at the moment a user feels a real constraint converts better than a passive, always-available link, because the prompt arrives when willingness to pay is highest | Free-to-paid conversion rate among prompted users vs. a held-out control shown the old generic link | At least a 1-percentage-point (pp) absolute lift in free-to-paid conversion for the prompted cohort, measured over a 30-day post-prompt window |
| 2 | Personalized onboarding email sequence, tailored to which features a user actually touched in their first session | A sequence referencing the user's own observed usage converts better than a generic feature-tour sequence, because it demonstrates relevance instead of asking the user to self-identify their use case | 30-day free-to-paid conversion rate, personalized vs. generic sequence, among users who opened at least one email | 0.5pp absolute lift, with email open rate not degrading (a guardrail, since a lift driven by only the most-engaged users opening more emails would not be a true win) |
| 3 | Time-boxed full-feature premium trial (rather than the standard permanently-gated freemium experience) offered to users showing engagement signals correlated with past conversions | Removing feature-gating uncertainty for a genuinely engaged cohort converts better than asking them to infer premium value from a gated experience | Trial-to-paid conversion rate among trial-eligible users who accept the trial | Trial-to-paid conversion rate of at least 25% (chosen against the team's own historical baseline for comparable time-boxed trials elsewhere in the product, not invented here) |
| 4 | Pricing/paywall page redesign clarifying the specific value gap between free and paid tiers (a feature-comparison layout replacing a plan-name-only comparison) | A paywall that names the SPECIFIC feature or limit a user is about to hit converts better than one that just lists plan names and prices | Paywall-view-to-checkout-start conversion rate | At least a 2pp absolute lift in paywall-to-checkout-start rate |
| 5 | App-store listing update (revised screenshots and description leading with the premium value proposition, rather than only the free feature set) | Attracting a higher-intent installer population at the acquisition step raises free-to-paid conversion among NEW cohorts, without requiring any change to in-product behavior for existing users | Free-to-paid conversion rate among users acquired via the app store, comparing cohorts acquired after the listing change to a matched pre-change cohort | At least a 0.5pp absolute lift in free-to-paid conversion specifically within the app-store-acquired cohort |
| 6 | Guided setup checklist for a specific high-value user segment (mirroring the same lever a B2B-marketplace merchant-activation program would use to raise activation), sized with an explicit sample-size calculation | A short, structured setup checklist shown to new users in this segment raises their activation-to-paid conversion by making the path to first value explicit rather than self-directed | Segment-specific free-to-paid conversion rate, checklist-shown vs. control | A 3-percentage-point absolute lift, from an assumed 8% segment baseline to 11%, detected at 80% power and 5% two-sided significance |
The month-6 sample-size calculation, worked explicitly (compact version: applied directly below using the standard two-proportion formula, without re-deriving it from first principles). Using the standard two-proportion sample-size formula
n=(p2−p1)2(zα/22pˉ(1−pˉ)+zβp1(1−p1)+p2(1−p2))2with p1=0.08, p2=0.11, zα/2=1.9600 (5% two-sided significance), and zβ=0.8416 (80% power), the computed sample size is 1,499 users per arm (2,998 total), actually computed in Python rather than estimated:
import math
from statistics import NormalDist
nd = NormalDist()
p1, p2, alpha, power = 0.08, 0.11, 0.05, 0.8
z_alpha, z_beta = nd.inv_cdf(1 - alpha/2), nd.inv_cdf(power)
p_bar = (p1 + p2) / 2
n = ((z_alpha*math.sqrt(2*p_bar*(1-p_bar)) + z_beta*math.sqrt(p1*(1-p1)+p2*(1-p2)))**2) / (p2-p1)**2
print(f"n per arm (raw) = {n:.2f}, ceil = {math.ceil(n)}, total = {2*math.ceil(n)}")
Output (actually executed): n per arm (raw) = 1498.39, ceil = 1499, total = 2998. This is what actually determines whether month 6 is even a realistically completable experiment: if this segment has materially fewer than roughly 3,000 eligible new users across the month, the experiment as designed cannot reach a conclusive read in the available time, and either the effect size being tested for needs to be larger (accepting the risk of missing a real but smaller effect) or the experiment needs to run longer than the single month slotted for it in this roadmap.
Trade-offs and pitfalls
- The arithmetic reality of the target deserves explicit acknowledgment. Moving from 2% to 5% free-to-paid conversion is a 150% relative increase; even optimistic individual experiments in a reasonably mature product typically produce single-digit-to-low-teens percent RELATIVE lifts each, not 150% in aggregate from six experiments. A senior answer states this tension directly rather than presenting the roadmap as guaranteed to hit the target: either the current 2% baseline reflects specific, large, fixable frictions (plausible if the product is young or has known major UX gaps, in which case bigger individual lifts are genuinely achievable), or the 5% target itself needs to be revisited as the roadmap's early results come in, with the sequencing designed to surface that reality quickly (front-loading experiments) rather than only in month 6.
- Each experiment's success threshold should be tied to what the CUMULATIVE roadmap needs to add up to the target, not chosen independently per experiment; a set of individually "successful" experiments that each clear their own small threshold can still fall well short of the 2%-to-5% goal if nobody checked the arithmetic adds up across all six.
- A common mistake is running all six experiments as fully independent, non-interacting bets; several of these (the upgrade prompt, the personalized emails, the paywall redesign) touch overlapping parts of the same conversion moment and can interact (a redesigned paywall changes the context the upgrade prompt is shown in), so later experiments in the sequence should account for the compounding effect of earlier shipped changes rather than being designed and analyzed in isolation as if the product were unchanged.
- The app-store-listing experiment (month 5) is measurement-different from the others in a way worth flagging: because it changes acquisition mix rather than in-product behavior, its "success" metric is necessarily cohort-based (comparing users acquired before versus after the change) rather than a randomized A/B split of existing users, which is a weaker causal design and more vulnerable to confounds like seasonality; treat its result with correspondingly more caution than the randomized in-product experiments.
Using these two tables, write SQL to compute CAC by channel for the last 30 days: ad_spend(date DATE, channel VARCHAR, spend NUMERIC), acquisitions(user_id BIGINT, acquired_at TIMESTAMP, channel VARCHAR). Include handling for spend attribution windows (e.g., spend from day-7 to day) and explain assumptions about aligning spend to acquisitions.
Sample Answer
Direct answer
Customer acquisition cost (CAC) by channel is total spend on that channel divided by the number of users it acquired, over the same reporting window, but the two tables rarely line up on time cleanly: spend on a given day influences acquisitions for some days afterward, not just that same day, so the query needs an explicit spend-attribution window (spend from day minus some lag through the acquisition day) rather than naively matching spend and acquisitions on the same calendar date. Every choice made about that window, and about which acquisition dates count as "the last 30 days," is an assumption that changes the resulting number and needs to be stated, not left implicit.
Structured elaboration
The core computation. For each channel, sum spend over the eligible spend window, sum acquisitions over the reporting window, and divide. Two separate windows are doing different jobs here: the acquisition window defines which users count as "acquired in the period being reported," and the spend-attribution window defines which spend is considered to have caused those acquisitions, and the two are not the same date range.
Why a lag is needed at all. Ad spend on a given day rarely converts to an acquisition that same day; a user might see an ad, research for a few days, and sign up a week later. A spend-attribution window (for example, spend from acquisition-day-minus-7 through acquisition-day) approximates this lag without needing a full touch-level attribution model, treating any spend within that lookback as having plausibly contributed to acquisitions in the reporting window. The lag length itself is an assumption that should be grounded in the actual typical consideration period for the product (a checked, not guessed, number), and stated explicitly whenever a CAC figure is reported.
Stating the alignment assumption plainly. Two assumptions specifically need to be named alongside any CAC number: what "last 30 days" means for the acquisition side (a trailing 30-day window ending on the report date, which excludes the report date's own start-of-window boundary by construction, worth checking against off-by-one expectations) and how far back the spend-attribution lag reaches, since that lag can pull spend from BEFORE the 30-day acquisition window into the denominator, which is intentional (spend from late in the prior month can genuinely be driving acquisitions early in the current window) but easy to get wrong if not made explicit.
Worked example
Schemas: ad_spend(date DATE, channel VARCHAR, spend NUMERIC), acquisitions(user_id BIGINT, acquired_at TIMESTAMP, channel VARCHAR).
-- Report date fixed at 2024-03-31; a 30-day trailing acquisition window; a 7-day spend-attribution lag
WITH windowed_acquisitions AS (
SELECT user_id, channel, date(acquired_at) AS acquired_date
FROM acquisitions
WHERE date(acquired_at) BETWEEN date('2024-03-31', '-29 days') AND date('2024-03-31')
),
acquisition_counts AS (
SELECT channel, COUNT(*) AS acquisitions_count
FROM windowed_acquisitions
GROUP BY channel
),
eligible_spend AS (
-- any spend date that could fall inside SOME acquisition's [acquired_date - 7, acquired_date] lag
SELECT date, channel, spend
FROM ad_spend
WHERE date BETWEEN date('2024-03-31', '-29 days', '-7 days') AND date('2024-03-31')
),
spend_totals AS (
SELECT channel, SUM(spend) AS total_spend
FROM eligible_spend
GROUP BY channel
)
SELECT
s.channel,
s.total_spend,
COALESCE(a.acquisitions_count, 0) AS acquisitions_count,
ROUND(s.total_spend / NULLIF(a.acquisitions_count, 0), 2) AS cac
FROM spend_totals s
LEFT JOIN acquisition_counts a ON a.channel = s.channel
ORDER BY s.channel;
Pinned data: paid_search has spend spread from 2024-02-25 through 2024-03-31 (deliberately including spend that predates the 30-day acquisition window, to exercise the 7-day lag reaching back into February) and three acquisitions, one of which (2024-03-01) falls exactly one day before the 30-day acquisition window's start boundary; email has spend and acquisitions entirely inside March.
CREATE TABLE ad_spend (date DATE, channel VARCHAR, spend NUMERIC);
CREATE TABLE acquisitions (user_id BIGINT, acquired_at TIMESTAMP, channel VARCHAR);
INSERT INTO ad_spend VALUES
('2024-02-25','paid_search',200),
('2024-03-15','paid_search',500),
('2024-03-31','paid_search',500),
('2024-03-10','email',30);
INSERT INTO acquisitions VALUES
(1,'2024-03-01 09:00:00','paid_search'), -- one day before the 30-day window start: must be excluded
(2,'2024-03-10 09:00:00','paid_search'),
(3,'2024-03-20 09:00:00','paid_search'),
(4,'2024-03-05 09:00:00','email'),
(5,'2024-03-25 09:00:00','email');
Output (actually executed, SQLite):
channel | total_spend | acquisitions_count | cac
email | 30 | 2 | 15.0
paid_search | 1200 | 2 | 600.0
Only 2 of paid_search's 3 pinned acquisitions count: the acquisition dated exactly 2024-03-01 falls one day before the acquisition window's start (2024-03-31 minus 29 days is 2024-03-02), which is the correct, intended behavior of a 30-day TRAILING window (29 days back plus the report date itself equals 30 calendar days total) and not a bug, but it is precisely the kind of boundary detail that must be stated alongside the number: a different, equally reasonable convention (30 days back, not 29) would have included that acquisition and produced a different CAC. The eligible spend total for paid_search, 1200, correctly includes the late-February spend rows because the 7-day lag pulls the eligible-spend window's start back to 2024-02-24.
Complexity
Both common table expression (CTE) branches are straightforward aggregations, O(A+S) where A is the number of acquisition rows and S is the number of spend rows in their respective date-bounded scans, assuming indexes on acquisitions(acquired_at) and ad_spend(date) so the WHERE filters can range-seek rather than scan the full history. The final join between two small, channel-grouped aggregates is negligible in cost regardless of the underlying table sizes.
Edge cases
- A channel with spend but zero acquisitions in the window: the
LEFT JOINfromspend_totalspreserves it withacquisitions_count = 0andcac = NULL(viaNULLIF), which correctly signals "this channel spent money and acquired nobody in this window" rather than silently dividing by zero or dropping the channel from the report. - A channel with acquisitions but no eligible spend rows (a free/organic channel, for instance): would be absent from
spend_totalsand therefore absent from this query's output entirely, since the query is spend-anchored (LEFT JOINfrom spend to acquisitions, not the reverse); if organic/zero-spend channels need to appear with an explicitcac = 0orNULL, the join direction needs to be reversed or aFULL OUTER JOINused instead, a deliberate design choice worth stating. - The acquisition at the exact boundary of the 30-day window (2024-03-01 in the pinned data, above): demonstrates the trailing-window convention concretely rather than abstractly, and is exactly the kind of edge that a stated, written-down window definition prevents two people from silently disagreeing about.
Trade-offs and pitfalls
- The spend-attribution lag is a modeling assumption, not a measured fact, unless it is derived from an actual attribution or path-length analysis on the product's real conversion timelines; picking a round number like 7 days without checking it against the typical consideration period risks systematically over- or under-crediting a channel whose real lag is materially different (a high-consideration B2B sale with a multi-week research phase would need a much longer lag than a 7-day default suggests).
- A common mistake is computing CAC per channel using each channel's own acquisitions and spend in isolation without checking whether a user shows multiple channels across their journey (in a single-touch acquisitions table, this table's own
channelcolumn has presumably already made that assignment, likely via a first-touch or last-touch rule); if so, that assignment rule directly determines this CAC number and should be stated alongside it, since a different assignment rule would shift spend and users between channels and produce different CAC figures for the exact same underlying data. - Reporting a channel's CAC without also reporting its acquisition volume invites a wrong read: a channel with very low CAC but negligible volume is not automatically the channel to scale, since the marginal CAC of scaling it further is not the same as its current average CAC (diminishing returns on a channel's available audience are common), a distinction worth naming explicitly whenever a CAC comparison is used to argue for reallocating budget.
Unlock Full Question Bank
Get access to all 46 Conversion Funnel Optimization interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.