What CTA metric wins an A/B test and how to log it?
This tests connecting instrumentation to business outcomes via a click metric and tracked event. An answer picks click or conversion rate, fires an event with variant ID, and notes uniqueness. A red flag is using views without linking the event to the button.
What's really being asked
This question checks whether you can translate a product request into an observable engineering task. The interviewer wants to see that you understand A/B testing is not just about changing UI text but about defining a measurable outcome and building the telemetry to support it. You need to show fluency in both product metrics and frontend instrumentation patterns.
The full answer
First, name the metric. For a call-to-action button, the primary metric is click-through rate on that specific element, or the downstream conversion rate such as add-to-cart or checkout starts if the CTA leads directly to those actions. Second, describe the instrumentation. You should fire a structured analytics event when the button is clicked, capturing at minimum the variant ID from the A/B test, the button identifier, a timestamp, and the user or session ID. Third, mention data quality. Explain that you would deduplicate clicks per session or per user so that one enthusiastic user does not skew the results, and that you would validate the event schema in a data layer or through an analytics provider before the experiment goes live. Fourth, note the baseline. A valid test requires holding the original button text as a control variant and splitting traffic roughly 50/50 so the event volumes are comparable.
The mistakes people make
A weak answer picks a vanity metric like page views or time on page as the winner criterion, which does not isolate the button text impact. Another red flag is suggesting a generic console log or untyped event that lacks the variant ID, making it impossible to join the click stream back to the experiment. Some candidates also forget deduplication and assume every click event is an independent signal, which inflates the variant performance.
What usually comes next
The interviewer may ask how you would handle statistical significance with low traffic, which means you should mention power analysis and running the test for at least one full business cycle. They might also ask how you would debug a variant that shows high clicks but low conversions, which is where you bring in session replay tools to watch user behavior and spot UX friction. Another follow-up is how to prevent flicker or latency in the A/B test assignment from polluting the event log, which touches on server-side rendering or synchronous bucketing.
A concrete example
Suppose you are testing Buy Now against Add to Cart on a product detail page. You would instrument the button so that on every click it pushes an event to your data layer with fields like event_name cta_click, variant buy_now_v2, product_id 12345, user_id abc, and timestamp. Your analytics pipeline counts unique cta_click events per user per variant over a two-week period. If Buy Now drives a 12% lift in add-to-cart rate with 95% confidence, you declare it the winner. If the click rate is high but add-to-cart is flat, you use session replays to see whether users are confused by the subsequent flow.
Interview question
Which approach correctly identifies a winning CTA variant and the telemetry to support it?
- a.Use total raw clicks counted by a generic event fired on every user interaction
- b.Use time on page tracked through console logs that record the rendered variant
- c.Use page views per variant logged via a page-load analytics event
- d.Use click-through rate measured by structured, deduplicated click events tagged with variant IDCorrect
Why? this is the answer
The primary metric for a CTA is click-through rate, and the event must include the variant ID with deduplication to avoid skew. Option A is tempting because it tracks clicks, but raw undeduplicated events inflate results and cannot be reliably attributed to a variant.
Just read this? Test yourself on what you have been reading.
Read the original → devblog.kogan.com
- #ab-testing
- #event-tracking
- #frontend-instrumentation
- #product-analytics
- #metrics
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
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