Ads Manager Campaign Creation Funnel Split by Experiment Variant
Last updated: November 29, 2026
Quick Overview
Given experiment assignments and Ads Manager events, compute for each variant the share of assigned advertisers who opened campaign creation, set a budget, and published a campaign after their assignment time.
Meta
November 29, 20260
0
0 solved
Given experiment assignments and Ads Manager events, compute for each variant the share of assigned advertisers who opened campaign creation, set a budget, and published a campaign after their assignment time.
Appears in Meta onsite SQL rounds for ads product data science, where funnels are almost always read through an experiment. The interviewer checks that the denominator is the assigned population, that only post-assignment events count, and that the result is ready for a significance test.
What the Interviewer Expects
- Uses all assigned advertisers as the denominator, not just those who were active
- Counts only events after each advertiser's assignment timestamp
- Produces per-variant step rates in one query
- Keeps the unit of analysis consistent with the randomization unit
- Mentions how to test the difference between variants
Key Topics to Cover
How to Approach This
- Clarify the schema and expected output format before writing queries.
- Use CTEs (WITH clauses) to break complex queries into readable steps.
- Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
- Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
- For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
- How would you compute a confidence interval for the publish rate difference?
- What if some advertisers were assigned but never exposed to the new flow?
- How would you handle advertisers who appear in both variants because of a bug?
- Would you analyze at the ad account or the person level, and why?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice SQL ProblemsSample Answer
Clarify the Data
assignments(ad_account_id, variant, assigned_ts) with one row per account, and ads_events(ad_account_id, event_name, event_ts) with open_create, set_budget, publish_campaign. Randomization i...
Approach
Start from assignments so every assigned account stays in the denominator (intent to treat). Left join events with the post-assignment condition in the join, then use conditional COUNT(DISTINCT ...)...