Hello Copilot
The examples below illustrate how to use the main Copilot.cx SDK components.
Chapter 2 is a walkthrough of a single Copilot.cx based flow - how to notify Copilot.cx for user session and how to report the analytic events associated with the user.
💡 Make sure you followed the Importing Copilot.cx SDK for Android and iOS
Notify about user's session - Manage session
Once the user creates authenticated logged in session with your backend Copilot.cx should be notified using the Manage session component passing user consent for analytics tracking.
⭐ More details about the Manage session commands can be found here
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);
Copilot.getInstance()
.Manage
.YourOwn
.sessionStarted(USER_ID_HERE,
USER_CONSENT_VALUE_HERE)
Track application behavior - Report
Reporting every event in your application allows Copilot.cx platform to analyse and engage correctly your users.
⭐ More details about Report component can be found here.
The Copilot.cx SDK already contains a set of predefined analytics events, simplifying the way you report events. Below an example of a signup event, which you should report when receiving a successful response upon registration.
Below you can see an example how to report the Signup succeeded analytics event
Copilot.instance.report.log(event: SignupAnalyticsEvent())
Copilot.getInstance().Report.logEvent(new SignupAnalyticsEvent());
Copilot.getInstance().Report.logEvent(SignupAnalyticsEvent())