Lifecycle & Recording

Setup & start recording

Pre API 2.0

Analytics.SetupAndStartRecording("YOUR API KEY");

API 2.0

There is no explicit setup() method. The SDK is set up automatically.

Also, recording can be started even though the project key is not set yet. The recorded data will not be sent out till the project key is set but will be stored for the "future" send.

This can be beneficial when the project key is fetched from a server. In this scenario, the recording can be started right away (on the application start). The recording will be complete, the upload of recorded data is just postponed for the moment when the project key is set.

Smartlook.Instance.preference.ProjectKey = "YOUR PROJECT KEY";
Smartlook.Instance.Start();

Start recording and project key documentation.

Start & stop recording

Pre API 2.0

Analytics.StartRecording();
Analytics.StopRecording();

API 2.0

Smartlook.Instance.Start();
Smartlook.Instance.Stop();

Start & stop recording documentation.

Check if the SDK is recording

Pre API 2.0

Analytics.IsRecording();

API 2.0

Smartlook.Instance.state.status.IsRecording();

Checking if the SDK is recording documentation.

Reset session/user

Pre API 2.0

// Reset session
Analytics.ResetSession(false);

// Reset session & user
Smartlook.ResetSession(true);

API 2.0

// Open new session
Analytics.Instance.user.session.OpenNew();

// Open new session & user
Smartlook.Instance.user.OpenNew();

Opening a new session documentation.
Opening a new user documentation.