Documentation

Documentation

  • YourOwn Setup
  • Connect Setup
  • YourOwn SDK
  • Connect SDK
  • YourOwn API
  • Connect API
  • Resources
  • Releases

›Reference

Getting started

  • Copilot Mobile SDK
  • Importing the iOS SDK
  • Importing the Android SDK
  • SDK configuration

Getting around

  • Hello Copilot

Reference

  • Manage session
  • Report
  • In-app messages
  • Authentication

Event reporting guide

  • Predefined events
  • Custom events

Appendix

  • Releases
  • Open source mapping

Manage session

In case the user and session management is done by your backend, Copilot SDK and Copilot cloud should be aware regarding user's active session information. This component functionality is reachable by accessing Copilot.instance.manage.yourOwn.

Session started

Notify to Copilot start tracking user's session when an authenticated session is obtained by your user management solution (e.g. user just performed signup or login in your application). The sessionStarted() method accepts the following parameters:

  • userId - (String) - The unique user identification used in your user management solution. This value should be exact same value that will be passed to the Collect API once triggered from your backend for this specific user.
  • isCopilotAnalysisConsentApproved - (Boolean) Property indicating whether the user accepted analytics tracking. In case the application does not require GDPR compliance, set this parameter as constant true.

The session data you provide is persistent on the mobile device. Meaning, after setting user's session data once, and the user re-starts the application, the values above will be used to track user's session until sessionEnded() or alternative sessionStarted() method will be invoked.

iOS
Android
Copilot.instance
.manage
.yourOwn
.sessionStarted(with: USER_ID_HERE,
isCopilotAnalysisConsentApproved: USER_CONSENT_VALUE_HERE)
Copilot.getInstance()
.Manage
.YourOwn
.sessionStarted(USER_ID_HERE,
USER_CONSENT_VALUE_HERE);

Session ended

Notify to Copilot end tracking of user's session when user performs logout in your application. Session data will be removed and any consecutive analytics event won't be bound to specific user's session.

iOS
Android
Copilot.instance
.manage
.yourOwn
.sessionEnded()
Copilot.getInstance()
.Manage
.YourOwn
.sessionEnded();

Update user's consent

Notify to Copilot to modify user's analytics tracking consent as which was set in when calling previously to the sessionStarted() method. The setCopilotAnalysisConsent() method accepts the following parameter:

isCopilotAnalysisConsentApproved - (Boolean) Property indicating whether the user accepted analytics tracking. In case the application does not require GDPR compliance, set this parameter as constant true.

iOS
Android
Copilot.instance
.manage
.yourOwn
.setCopilotAnalysisConsent(isConsentApproved: USER_CONSENT_VALUE_HERE)
Copilot.getInstance()
.Manage
.YourOwn
.setCopilotAnalysisConsent(USER_CONSENT_VALUE_HERE);
← PreviousReport →
  • Session started
  • Session ended
  • Update user's consent
Copilot
Mail: hello@copilot.cx
Call: (212).398.0001
© Copilot 2021