A/B testing is the cornerstone of modern product development and marketing. Whether you're testing a new call-to-action button, a redesigned user flow, or a different email subject line, the goal is always the same: to make data-driven decisions. But collecting the data is only half the battle. The real challenge often lies in the analysis—specifically, in efficiently comparing user groups to understand the true impact of your changes.
What if you want to identify the exact users who converted in your new "variant" group? Or perhaps more importantly, who was exposed to the new feature but didn't convert? These questions often involve comparing massive lists of user IDs or emails, a task that can become surprisingly complex and computationally expensive.
This is where a powerful, yet simple, concept from set theory comes into play: the difference. And with a developer-first tool like lists.do, performing this operation is no longer a chore but a simple API call.
Let's imagine a common A/B testing scenario. You've just run a week-long test for a new checkout page design.
At the end of the week, you have a list of 80,000 unique users who made a purchase. Now, the analysis begins. You need to answer critical questions to determine the winner and plan your next steps:
While you could perform a series of complex SQL joins or write a memory-hungry script to loop through these lists, there's a much more elegant way.
A "list diff" (or a set difference) is an operation that takes two lists and returns the items that are in the first list but not in the second. This is an incredibly powerful tool for user segmentation.
Let's apply it to our A/B test. Imagine you want to identify every user who saw the new design (Group B) but did not complete a purchase. This is the perfect use case for a diff operation.
Goal: Find non-converters in the variant group.
Logic: [Users in Group B] DIFFERENCE [All Users Who Converted]
This simple operation instantly gives you a clean list of users for re-engagement campaigns or qualitative feedback surveys. It cuts through the noise and gives you a precise, actionable segment.
Performing this operation at scale is where lists.do shines. As a "Lists as a Service" platform, we provide powerful list operations via a simple API, handling the heavy lifting on our optimized cloud infrastructure. You can manipulate, compare, and manage lists of any size without impacting your own server resources.
Here’s how you would find those non-converting users from your variant group using the lists.do SDK.
import { createClient } from '@do/sdk';
const lists = createClient('lists.do');
// Find users who saw the new feature but did not convert
async function findNonConvertingUsers() {
// A list of all user IDs in your variant group
const variantGroupUsers = ['user_1', 'user_2', 'user_3', 'user_4', /* ... millions more */];
// A list of all user IDs who converted during the test
const convertedUsers = ['user_2', 'user_9', 'user_15', 'user_3', /* ... */ ];
// Find the users in the first list who are NOT in the second list
const { data: nonConverters } = await lists.diff({
source: variantGroupUsers,
exclude: convertedUsers
});
console.log(nonConverters);
// Output: ['user_1', 'user_4'] and the rest of the non-converting users
}
findNonConvertingUsers();
With one clear API call, you've performed a complex data manipulation task that would otherwise require significant custom code and processing power. You've stopped reinventing the wheel and focused on your application's core logic.
You might be thinking, "Can't I just do this myself?" While it's possible, using an API like lists.do offers distinct advantages, especially as you scale.
Accurate and efficient analysis is what makes A/B testing worthwhile. By leveraging fundamental set theory operations like list diffs, you can gain clearer insights into user behavior and segment your audience with precision. Using the lists.do API, you can execute these operations effortlessly, allowing you to build more responsive, data-driven products faster than ever before.
Ready to stop wrestling with large arrays and start focusing on results? Explore the lists.do API today.
Q: What types of list operations can I perform with lists.do?
A: Our platform supports a comprehensive suite of operations, including sorting, filtering, mapping, finding unique items (uniques), calculating intersections and differences (diffs), merging, and other powerful set theory functions.
Q: How does lists.do handle very large lists?
A: lists.do is built for scale. Operations are executed on our optimized cloud infrastructure, allowing you to process lists with millions of items asynchronously without impacting your own server resources.
Q: Can I integrate lists.do with my current tech stack?
A: Yes. We offer simple REST APIs and developer-friendly SDKs for languages like TypeScript/JavaScript, Python, and Go, making it easy to integrate list operations into any new or existing project.