Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Have Your Cake and Eat It Too with AB Testing

Nick Capurso
September 26, 2017

Have Your Cake and Eat It Too with AB Testing

Presented at Droidcon NYC 2017.

Abstract:
Nobody wants to waste time building features that won’t be successful. Unfortunately, it’s often difficult to anticipate users’ reactions and once your feature is out in the wild, it’s hard to iterate and gauge the right direction to take a failing feature — are users finding it difficult to use? Maybe they just can’t find it within your app? Or maybe the UI doesn’t invoke engagement? Enter A/B testing: try out variations on the same feature with different segments of your user base, make changes on-the-fly without a new release, and have the data to back up what works best for your users. Enable your team to make confident, data-driven decisions to bring about the success of your features. The Capital One Wallet teams have actively been integrating A/B tests into new features and we’ve had successes even with seemly-insignificant A/B tests -- for example, slightly tweaking push notification text through A/B tests has led to a 5-10% increase in our notification clickthru rates! In this talk, you’ll learn the different types of A/B tests which can be conducted and some best practices around A/B testing -- how should you be testing? And when is it appropriate? You’ll learn some of the considerations of A/B testing that come specifically with Android and you’ll also see some examples of using third party libraries -- including Firebase Remote Config and Swrve. Get the best tips on how to choose a third party library to eliminate "gotchas" and even gain insight towards building an in-house solution. Embrace your indecisiveness, try all the possibilities, and maximize the potential of your future features.

Nick Capurso

September 26, 2017
Tweet

More Decks by Nick Capurso

Other Decks in Technology

Transcript

  1. Have Your Cake and Eat It Too with A/B Testing

    Nick Capurso, @nickcapurso Capital One
  2. What am I going to learn? ä What is A/B testing?

    ä Why should I A/B test? ä How do I A/B test? ⬥ Evaluating third-party libraries ⬦  Firebase Remote Config ⬦  Swrve
  3. Cake for developers We want…: ä Scale ä Engaged users ä To build

    great features ä To use best practices …but also: ä Customized user experiences ä Drive user engagement ä Successful features ä Iterate on features ä Rated highly
  4. We want…: ä Scale ä Engaged users ä To build great features ä To

    use best practices …but also: ä Customized user experiences ä Drive user engagement ä Successful features ä Iterate on features ä Rated highly Cake for developers
  5. Answer: A/B Testing We want…: ä Scale ä Engaged users ä To build

    great features ä To use best practices Enables: ä Customized user experiences ä Drive user engagement ä Successful features ä Iterate on features ä Rated highly
  6. What is A/B Testing? Sign Up Email Password Sign In

    Sign Up Forgot? Email Password Sign In Forgot?
  7. What is A/B Testing? Group A Group B Sign Up

    Email Password Sign In Sign Up Forgot? Email Password Sign In Forgot?
  8. What is A/B Testing? Group A Group B 40% 58%

    Sign Up Email Password Sign In Sign Up Forgot? Email Password Sign In Forgot?
  9. What is A/B Testing? Group A Group B 40% 58%

    Sign Up Email Password Sign In Sign Up Forgot? Email Password Sign In Forgot?
  10. What is A/B Testing? Group A Group B Four steps:

    ä Define a goal ä Segment users into groups ä Deliver different content ä Monitor goal progress
  11. What is A/B Testing? Control Variant 1 Four steps: ä Define

    a goal ä Segment users into groups ä Deliver different content ä Monitor goal progress Variant 2
  12. What is A/B Testing? Winning Variant Applied Four steps: ä Define

    a goal ä Segment users into groups ä Deliver different content ä Monitor goal progress
  13. What is A/B Testing? Usually, some extra steps: ä Define a

    goal ä Segment users into groups ä Deliver different content ä Monitor goal progress ä Iterate your testing ä Hardcode the winner Control Variant 1 Variant 2
  14. Example: Notification Permission Group A Group B ä Goal: User opts

    in to pushes ä Segment: Random percentage ä Deliver: Different titles ä Monitor: Catchier titles == more opt ins?
  15. Basic Interaction Model SDK Server Test 1 Test 2 Content

    getContent (“User A”) init(…)
  16. Considerations when Choosing a Third-Party Library A/B Test Preparation ä 

    SDK Initialization ä  Content Management ä  Analytics ä  User Segmentation ä  A/B Test Setup & Iteration Platform Features ä  User Engagement Mechanisms ä  Manual data upload ä  Data export Other ä  End-User Identity ä  QA Testing
  17. Considerations when Choosing a Third-Party Library A/B Test Preparation ä 

    SDK Initialization ä  Content Management ä  Analytics ä  User Segmentation ä  A/B Test Setup & Iteration Platform Features ä  User Engagement Mechanisms ä  Manual data upload ä  Data export Other ä  End-User Identity ä  QA Testing
  18. SDK Initialization ä  When & how is content downloaded? SwrveSDK.createInstance(this,

    12345, "api_key"); SwrveSDK.setResourcesListener(() -> { // Resources updated });
  19. SDK Initialization ä  Initialization during push notifications ⬥  Customize message

    based on user properties. ⬥  Download times? ⬥  Swrve: Difficult ⬥  Firebase Remote Config: Yes ä  Caching downloads
  20. Content Retrieval // Firebase -- supply parameter name FirebaseRemoteConfig.getInstance().getString("permission_location_title"); //

    Swrve -- supply resource ID, attribute name, default value SwrveSDK.getResourceManager().getAttributeAsString( "permission.location", "title", "We Need Your Location");
  21. Content Retrieval // Firebase -- supply parameter name FirebaseRemoteConfig.getInstance().getString("permission_location_title"); //

    Swrve -- supply resource ID, attribute name, default value SwrveSDK.getResourceManager().getAttributeAsString( "permission.location", "title", "We Need Your Location");
  22. Content Management ä How to A/B test images? ⬥  Filenames ⬦ 

    No loading needed ⬦  Embed in client ⬥  URLs ⬦  Dynamic ⬦  Need prefetching / loading ⬩  Picasso
  23. Content Management ä Text formatting ⬥  Line breaks, bold / italics,

    etc. ⬦  Nether Swrve nor Remote Config support ⬥  Html.fromHtml(...)
  24. Content Management ä Localization ⬥  Remote Config: use the Conditions system

    (next section) ⬥  Swrve: separate attributes for different languages
  25. Content Management ä Character limits ⬥  Swrve: 256 chars per attribute

    ⬥  Firebase: Project total can’t exceed 500,000.
  26. Analytics ä Maintaining internal analytics ⬥  “Spikes” from A/B tests ⬥ 

    You should supply “A/B test” contextual information Time Count
  27. User Segmentation ä Analytics triggered ⬥  “All users who did not

    log in this week” ä User properties ⬥  “All users who live on the East coast” ä Random percentage ⬥  “Shuffle the userbase into N groups” ⬥  Stability
  28. User Segmentation ä Analytics triggered ⬥  “All users who did not

    log in this week” ä User properties ⬥  “All users who live on the East coast” ä Random percentage ⬥  “Shuffle the userbase into N groups” ⬥  Stability
  29. User Segmentation – User Properties // Firebase (note, keys limited

    to 24 chars) FirebaseAnalytics.getInstance(this).setUserProperty( "favorite_show", "Game of Thrones"); // Swrve Map<String, String> map = new HashMap<>(); map.put("favorite_show", "Game of Thrones"); SwrveSDK.userUpdate(map);
  30. User Segmentation ä Analytics triggered ⬥  “All users who did not

    log in this week” ä User properties ⬥  “All users who live on the East coast” ä Random percentage ⬥  “Shuffle the userbase into N groups” ⬥  Stability
  31. A/B Testing Group A Group B Sign Up Email Password

    Sign In Sign Up Forgot? Email Password Sign In Forgot?
  32. A/B Testing – Remote Config Problem: Analytics doesn’t know about

    your A/B test Events, user properties Parameters, conditions, A/B tests
  33. A/B Testing – Remote Config Solution: Add a “Test Variant”

    Parameter -> User Property analytics.setUserProperty("location_test_variant", firebaseRemoteConfig.getString("permission_location_test_variant"));
  34. A/B Testing – Iterate! Time Count A/B Test v2 Running

    More users exposed Engagement rises accordingly
  35. A/B Testing ä Scalability for a large number of tests ⬥ 

    How easy is it to run & organize tests? ⬥  Remote Config: A/B tests are tied into parameters ⬥  Swrve: Dedicated A/B test section
  36. A/B Testing ä Flexibility with user segments ⬥  Ability to construct

    multifaceted user segments ⬥  Remote Config: Conditions ⬥  Swrve: User Segments
  37. A/B Testing ä Choosing & applying a winner ⬥  Swrve: Built-in

    to A/B testing ⬥  Remote Config: Removing variant conditions & setting default ⬥  Don’t forget to iterate! ⬦  Re-run, but with a different split – is your winning variant still winning? ⬥  Hardcode the winner in your next release ⬦  Remove A/B test code
  38. A/B Testing ä Choosing & applying a winner ⬥  Swrve: Built-in

    to A/B testing ⬥  Remote Config: Removing variant conditions & setting default ⬥  Don’t forget to iterate! ⬦  Re-run, but with a different split – is your winning variant still winning? ⬥  Hardcode the winner in your next release ⬦  Remove A/B test code
  39. A/B Testing ä Choosing & applying a winner ⬥  Swrve: Built-in

    to A/B testing ⬥  Remote Config: Removing variant conditions & setting default ⬥  Don’t forget to iterate! ⬦  Re-run, but with a different split – is your winning variant still winning? ⬥  Hardcode the winner in your next release ⬦  Remove A/B test code
  40. Considerations when Choosing a Third-Party Library A/B Test Preparation ä 

    SDK Initialization ä  Item Management ä  Analytics ä  User Segmentation ä  A/B Test Setup & Iteration Platform Features ä  User Engagement Mechanisms ä  Manual data upload ä  Data export Other ä  End-User Identity ä  QA Testing
  41. User Engagement Mechanisms ä Push Notifications ⬥  A/B tested pushes ⬥ 

    Remote Config – tricky, separate campaigns per variant.
  42. Manual Data Upload ä Problem: User segmentation for a one-off test.

    ⬥ i.e. “Target all users who made a purchase at Starbucks last week.”
  43. Manual Data Upload ä Problem: User segmentation for a one-off test.

    ⬥ i.e. “Target all users who made a purchase at Starbucks last week.” ⬦ Devs have to bloat the code ⬦ Confidential data ⬦ Data may not be all in the platform yet
  44. Manual Data Upload ä Problem: User segmentation for a one-off test.

    ⬥ i.e. “Target all users who made a purchase at Starbucks last week.” ⬦ Devs have to bloat the code ⬦ Confidential data ⬦ Data may not be all in the platform yet
  45. Manual Data Upload ä Problem: User segmentation for a one-off test.

    ⬥ i.e. “Target all users who made a purchase at Starbucks last week.” ⬦ Devs have to bloat the code ⬦ Confidential data ⬦ Data may not be all in the platform yet
  46. Manual Data Upload ä Problem: User segmentation for a one-off test.

    ⬥ i.e. “Target all users who made a purchase at Starbucks last week.” ⬦ Devs have to bloat the code ⬦ Confidential data ⬦ Data may not be all in the platform yet
  47. Manual Data Upload ä Solution 1: One-off “eligibility” user property ä Solution

    2: batch upload CSV: ⬥  Supported by Swrve’s REST API firebaseAnalytics.setUserProperty(“special_campaign_1", “TRUE"); PLATFORM USER ID SPECIAL CAMPAIGN 1 ELIGIBLE 18 TRUE 53 TRUE 1408 TRUE
  48. Data Export ä Drawing compex conclusions from A/B tested data ⬥ 

    Remote Config: BigQuery ⬥  Both: CSV Exports ä Useful when multiple factors determine “success” ⬥  Feature engagement + feedback + increased login ?
  49. Considerations when Choosing a Third-Party Library A/B Test Preparation ä 

    SDK Initialization ä  Item Management ä  Analytics ä  User Segmentation ä  A/B Test Setup & Iteration Platform Features ä  User Engagement Mechanisms ä  Manual data upload ä  Data export Other ä  End-User Identity ä  QA Testing
  50. End-User Identity ä Lots of user-specific data needed. ä Mapping to/from your

    users. Internal APIs ”Nick” A/B Platform “User 12AB”
  51. End-User Identity ä Lots of user-specific data needed. ä Mapping to/from your

    users. ä How do you protect your users’ private information, but also run powerful A/B Tests?
  52. End-User Identity ä Leak-safe, correlation ID, used only for third- parties

    ⬥  Internal ID ßà Correlation ID à Third Party ä Override platform’s ID or use a user property // Firebase FirebaseAnalytics.getInstance(this).setUserId("12345"); // Swrve SwrveSDK.getConfig().setUserId("12345");
  53. End-User Identity ä Leak-safe, correlation ID, used only for third- parties

    ⬥  Internal ID ßà Correlation ID à Third Party ä Override platform’s ID or use a user property // Firebase FirebaseAnalytics.getInstance(this).setUserId("12345"); // Swrve SwrveSDK.getConfig().setUserId("12345");
  54. QA Testing ä Easy place device in any A/B test variant

    ä Verify events & user properties sent
  55. Considerations when Choosing a Third-Party Library A/B Test Preparation ä 

    SDK Initialization ä  Item Management ä  Analytics ä  User Segmentation ä  A/B Test Setup & Iteration Platform Features ä  User Engagement Mechanisms ä  Manual data upload ä  Data export Other ä  End-User Identity ä  QA Testing
  56. Considerations when Choosing a Third-Party Library A/B Test Preparation ä 

    SDK Initialization ä  Item Management ä  Analytics ä  User Segmentation ä  A/B Test Setup & Iteration Platform Features ä  User Engagement Mechanisms ä  Manual data upload ä  Data export Other ä  End-User Identity ä  QA Testing Nick Capurso Capital One @nickcapurso
  57. Extra – Dynamic Configurations -- Swrve ä Equivalent for resources not

    in A/B tests. ä Delivering unique content to segments is tricky.