You can keep track of what your users are doing by monitoring the user sessions and application sessions in progress.
An application session begins when a user starts an application and ends when the application exits, or goes in background. Each application session corresponds to an application currently running.
Vessel will automatically track your application sessions.
A user session begins when a user takes certain action and ends when action is completed. E.g To major listening time or time spent in shopping cart you need add following code.
// You can start "Listening" session by calling following startSession method.
VesselAB.startSession("Listening");
// To end the "Listening", use following endSession method.
VesselAB.endSession("Listening");
Or
//If you have started multiple sessions, to end and report them all at once. Call end all session
// method as shown bellow.
VesselAB.endAllSessions();
You can keep track of what your users are doing by monitoring the user sessions and application sessions in progress.
An application session begins when a user starts an application and ends when the application exits, or goes in background. Each application session corresponds to an application currently running.
Vessel will automatically track your application sessions.
A user session begins when a user takes certain action and ends when action is completed. E.g To major listening time or time spent in shopping cart you need add following code.
// You can start "Listening" session by calling following startSession method.
/** Starts a new session.
@param sessionName The session that is to be started.
*/
[VesselAB startSession:@"Listening"];
// To end the "Listening", use following endSession method.
/** Ends a started session.
@param sessionName The session to be ended. Note that the session has to be started to end it.
*/
[VesselAB endSession:@"Listening"];
You can add the following code when your app goes to background to ensure that session times are correctly recorded
/** Ends all sessions that have been started but haven't been ended yet.
*/
//If you have started multiple sessions, to end and report them all at once. Call end all session
// method as shown bellow.
[VesselAB endAllSessions];
/** Discards all sessions that have been started but haven't been ended yet.
*/
[VesselAB endAllSessions];
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];
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();
To report a checkpoint, you can use the VesselAB.checkPointVisited() method as show below
VesselAB.checkPointVisited("signedUpWithTwitter");
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");
}
}