Apply Test Filters

Vessel makes it easy to segment your customers. To do so, first navigate to your test in the dashboard. Then add filters inbuilt or custom filters. Learn more

Vessel provides inbuilt filters like App,SDK Version, Device model, manufacture, New vs Returning users etc. But you can define your own custom filters also.

E.g. Deliver test to all paid users who have not bought any coins in your game. To add a customer to this segment, set custom filters as follows.

/* Set custom filter properties. You can pass in custom properties like "age", "23"
     * and add a filter "age > 20" on the vessel dashboard.
     * Custom properties are not saved and need to be initialized on app startup.
     * 
     * @param properties -Map of properties. Properties will be co-erced to required types.
     * For boolean properties, expected values are "true" or "false"
     */

        HashMap<String, String> map = new HashMap<String, String>();
        map.put("paid_user", "true");
        map.put("age", "23");
        map.put("ltv", "2.99");
        
        VesselSDK.setCustomFilterProperties(map);

Apply Test Filters

Vessel makes it easy to segment your customers. To do so, first navigate to your test in the dashboard. Then add filters inbuilt or custom filters. Learn more

Vessel provides inbuilt filters like App,SDK Version, Device model, manufacture, New vs Returning users etc. But you can define your own custom filters also.

E.g. Deliver test to all paid users who have not bought any coins in your game. To add a customer to this segment, set custom filters as follows.

// The method allows you to set custom filter key and values. It will show A/B test to users who 
    // will given set of filters.
     
    // @param filters - Valid NSDictionary containly filter and its values.
    

    Vessel *sharedInstance = [Vessel sharedInstance];
    [sharedInstance setFilters:@{@"paidUser":@YES, @"bought Coins":@NO}];

Track user sessions

To track user sessions you can use startSession and endSession methods.

Eg. To track a user sessions, you can add the following code

// E.g. if user enters in level1 then simply call startSession method.
vesselab.startSession(
    function(){},
    function(error){console.log("error "+ error)}, 
    "level1");

You can add the following code when your app goes to background to ensure that session times are correctly recorded

[VesselAB endAllSessions];

Track user sessions

To track user sessions you can use startSession and endSession methods.

Eg. To track a user sessions, you can add the following code

VesselSDK.startSession("signUpWithFacebook");
// When user completes signup or cancels signup
VesselSDK.endSession("signUpWithFacebook");

You can add the following code when your app goes to background to ensure that session times are correctly recorded.

VesselSDK.endAllSessions();

Adding checkpoints and sessions

Adding checkpoints

To report a checkpoint, you can use the VesselAB.checkPointVisited() method as show below

VesselAB.checkPointVisited("signedUpWithTwitter");

Adding sessions

To track user sessions you can use VesselAB.startSession("YOUR_SESSION_NAME") and VesselAB.endSession("YOUR_SESSION_NAME"). You can also close all open sessions by calling VesselAB.endAllSessions()

Eg. To track a user session called as SignUp we can add the following code

public partial class HomePage : PhoneApplicationPage
    {
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            VesselAB.startSession("SignUp");
        }

        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            VesselAB.endSession("SignUp");
        }
    }