Checkpoints

Checkpoint are the specific events that users perform within your App - for example, logging in with Facebook, completing an action, watching a video, or seeing a certain screen within your App.

1. Report Checkpoint

Vessel allows for an unlimited number of checkpoints.

// To report a checkpoint use following method

- (void) reportCheckPoint:(NSString*)checkPointName withMeta:(NSDictionary *) metaData;

// For example 

NSDictionary* metaData = @{
  @"unitValue": @50,
  @"selectedPlan": @"premium",
};

Vessel *sharedInstance = [Vessel sharedInstance];
[sharedInstance reportCheckPoint:@"plan_upgraded" withMetaData:metaData];
// To report a checkpoint use following method

public static void reportCheckpoint(String checkPointName, JSONObject metaData);

// For example

JSONObject metaData = new JSONObject();
metaData.put("itemValue", 50);
metaData.put("itemNumber", 1289);
metaData.put("itemName", "Nike Air");
		
VesselSDK.reportCheckpoint("addedToCart", metaData);
vesselsdk.reportCheckpoint('game_ended', {'gameLevel':20, 'no_coins':3500});

This will report a checkpoint to all the active a/b tests on the device.

2. Report checkpoint to specific A/B test (Optional)

If you want to report a checkpoint to only specific test then use following method.

// To report a checkpoint to specific A/B test

- (void) reportCheckPoint:(NSString*)checkPointName forTest:(NSString*)testName with:(NSDictionary *) metaData;

// For example 

[sharedInstance reportCheckPoint:@"plan_upgraded" forTest:@"plan_test" with:metaData]
/**
* This method will report checkpoint to only test with given testName. 
* 
* @param testName
* @param checkPointName
* @param metaData
*/
VesselSDK.reportCheckpoint(testName, checkPointName, metaData)