Onboarding test

Let assume you want to test, which sign up screen A or B drives more user signups. To do so create test and define variation controls.

Onboarding A/B Test

Instrument your landing test in your activity as follows

/**
     * This method set ABListener and gives call back when test is loaded or
     * failed.
     * 
     * @param ABListener
     */
    VesselAB.getVariationForTest("YOUR_TEST_NAME", new ABListener() {

        @Override
        public void testNotAvailable(TestVariation arg0) {
            // Test is not available, show default user flow
        }

        @Override
        public void testAvailable(String s, TestVariation variation) {
        
            // if we have variation B then show onboarding or control show home.
            if(variation == TestVariation.B){
                // Show new onboarding user flow.
            }else{
               // Show old onboarding user flow.
            }
        }
    });

Onboarding test

Let assume you want to test, which sign up screen A or B drives more user signups. To do so create test and define variation controls.

Onboarding A/B Test

Instrument your landing test in your View Controller as follows

/** Returns a variation returned by the Vessel server.
 
 @param testName - Look up and load variation for given test.
 @param success This block is called when the test is retrieved successfully from the Vessel server.
 @param failure This block is called when the test fails to load.
 */

    [VesselAB getVariationForTest:@"YOUR_TEST_NAME" WithSuccessBlock:^(NSString *testName, VesselABTestVariation variation) {
        
        if (variation == VesselABTestVariationB) {
            // Show Variation B

        } else {
            // Show Variation A or go to default screen.
        }
        
    } failureBlock:^{
        // Show default flow.
    }];

Onboarding test

Let assume you want to test, which sign up screen A or B drives more user signups. To do so create test and define variation controls.

Onboarding A/B Test
document.addEventListener("deviceready", onDeviceReady, false);

    function onDeviceReady() {
    
        // Set Vessel AB listener, in other pages.
        vesselab.setABListener(function(testVariation){
            // Now test is available you can check which variation is looded 
            // and decide 
            console.log("Test is available");
            
            }, function(error){
                console.log("Test is not available");

        // Show default screen 
        });
    }

Onboarding test

Let assume you want to test, which sign up screen A or B drives more user signups. To do so create test and define variation controls.

Onboarding A/B Test

Instrument your apps.js to load the screen as follows

var VesselSDK = require('io.vessel');

    VesselSDK.setABListener(function(resp) {

        // Sucessfully loaded AB Test
        if (e.test == 'testName') {
            
            if (e.variation == 'A') {
            
            // Open variation A UI
            
            } else if (e.variation == 'B') {
            
            // Open variation B UI
            }
        }
    },
    function (e) {
        // No test
        Ti.API.info('Vessel No test');
        // Open default.
        }
    );

Onboarding test

Let assume you want to test, which sign up screen A or B drives more user signups. To do so create test and define variation controls.

Onboarding A/B Test

Instrument your landing test in your page's code-behind as follows

public partial class HomePage : PhoneApplicationPage
    {
        // Constructor
        public HomePage()
        {
            InitializeComponent();
            Loaded += HomePage_Loaded;
        }

        void HomePage_Loaded(object sender, RoutedEventArgs e)
        {
            VesselAB.setABListener(new MyCallbacks());
        }

        class MyCallbacks : ABListener
        {
            public void testLoading()
            {
              // Show loading
            }

            public void testLoaded(String testName, TestVariation variation)
            {
              // Check which variation control is loaded 
              // if A or B -> Show new landing screen experience

            }

            public void testNotAvailable(TestVariation variation)
            {
              // Show default screen
            }
        };

    }