Badoo Alexander Jul 4, 2018

Split Testing (A/B Testing) with Swift

Article Summary

Alexander shows how a simple A/B test doubled in-app currency purchases from 2% to 4% at Badoo. Here's how to build the same testing framework in Swift.

With millions of apps competing for attention, companies like Badoo run multiple split tests simultaneously to validate features. This article walks through building a client-side A/B testing framework in Swift, complete with persistent storage and analytics integration.

Key Takeaways

Critical Insight

A lightweight, protocol-driven Swift framework enabled rapid experimentation that doubled conversion rates from 2% to 4%.

The full GitHub implementation reveals how Badoo manages multiple simultaneous tests with persistent user grouping.

About This Article

Problem

Badoo wanted to figure out which UI changes would actually get users more engaged. They had an old profile design and two new versions they wanted to test at the same time across different groups of users.

Solution

Alexander created a Swift framework based on protocols called SplitTestProtocol and SplitTestGroupProtocol. It saves which group each user belongs to in UserDefaults and connects to analytics tools. The whole thing lets you run a new test in under a minute.

Impact

When they tested different difficulty coefficients for in-app currency purchases, conversion went from 2% up to 4% once they applied the optimized coefficient.