User Tracking

The Vessel library will assign a default unique identifier (we call it a "Vessel ID") to each unique user who installs your application. This Vessel ID is saved to device storage so that it will persist across sessions.

You can also assign your own user identifier to recognize installs. This is particularly useful if a user is using your app on multiple platforms and you would like to show same test across all the devices. Use following method to set user identifier.

VesselSDK.setUserId("YOUR_USER_ID")

User Tracking

The Vessel library will assign a default unique identifier (we call it a "Vessel ID") to each unique user who installs your application. This Vessel ID is saved to device storage so that it will persist across sessions.

You can also assign your own user identifier to recognize installs. This is particularly useful if a user is using your app on multiple platforms and you would like to show same test across all the devices. Use following method to set user identifier.

/** Sets a user identifier for the sessions and checkpoints.
 
@param userId A string to be associated with sessions and checkpoints.
 */

[VesselAB setUserId:@"YOUR_USER_ID"];

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");
        }
    }