How would you A/B test sign-up button copy and measure results?

This tests basic experimental design. A strong answer covers: random assignment, serving variant copy, tracking impressions and conversions, and measuring lift. A red flag is sequential testing or vanity metrics like clicks without sign-ups.
What's really being asked
This question tests whether you understand the full lifecycle of a controlled experiment in a production environment. It is not enough to say you would show half the users one button and half the other. The interviewer wants to see that you think about randomization, instrumentation, data integrity, and statistical validity. At a senior level, they also want to know you can avoid common pitfalls like selection bias, flicker, or measuring the wrong metric.
The full answer
A good answer hits four things in order. First, randomization and bucketing. You need a mechanism to randomly split traffic, such as hashing a user ID or session ID modulo 100, and you must ensure the assignment is sticky so the same user always sees the same variant. Second, rendering the variant. The copy swap should happen before the page paints to avoid flicker or layout shift, which means doing it server-side or immediately in the head of the document if client-side. Third, data collection. You must track at least two events: an impression when the button is shown, and a conversion when the user completes sign-up. Without the denominator of impressions, you cannot calculate a conversion rate. Fourth, analysis. You compare conversion rates between the two groups and use a statistical significance test, typically aiming for a p-value below 0.05 and ensuring the sample size is large enough to detect a meaningful effect.
The mistakes people make
A common wrong answer is suggesting you show version A for one week and version B for the next week. This introduces temporal bias because traffic composition, day-of-week effects, or external campaigns change over time. Another red flag is only tracking clicks on the button rather than completed sign-ups, which creates a leaky funnel metric. Some candidates also forget to mention randomization entirely and suggest manual assignment or geo-based splitting, which breaks the control needed for causal inference.
What usually comes next
An interviewer might ask how you would handle a user switching devices, which breaks sticky assignment unless you use a logged-in user ID. They might also ask how to run multiple concurrent experiments without interaction effects, or how you would calculate the required sample size before launching. Another follow-up is what you would do if the variant wins but the absolute lift is tiny, questioning business significance versus statistical significance.
A concrete example
Suppose you have 100,000 daily visitors to the sign-up page. You hash each visitor's user ID to a number from 1 to 100. If the result is 50 or below, they see the control copy Start Free Trial; above 50, they see the variant Get Started Now. Your analytics pipeline fires an impression event when the button renders and a conversion event when the sign-up API returns success. After two weeks, the control has 50,000 impressions and 2,500 conversions for a 5.0 percent rate, while the variant has 50,000 impressions and 2,750 conversions for a 5.5 percent rate. You run a chi-squared test and find the result is statistically significant at p equals 0.03, so you recommend shipping the variant.
Interview question
When A/B testing sign-up button copy, which practice ensures you can accurately attribute differences in sign-ups to the copy change?
- a.Randomly assign users to variants using a hashed user ID, track impressions and conversions, and compare conversion ratesCorrect
- b.Show version A for one week and version B for the next to avoid overlap
- c.Split users by geolocation and compare sign-up counts across regions after two weeks
- d.Track button clicks for each variant and compare click counts, assuming more clicks lead to more sign-ups
Why? this is the answer
Randomizing with hashed user IDs and tracking both impressions and completed sign-ups lets you calculate a true conversion rate and establish causality. Sequential testing introduces temporal bias because traffic composition and external factors differ between weeks, invalidating the comparison.
Just read this? Test yourself on what you have been reading.
Read the original → optimizely.com
- #ab-testing
- #experimentation
- #frontend
- #data-instrumentation
- #conversion-optimization
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on ab-testing — each one lists the topics its interview covers.
See open roles