Predefined events
Below is the list of the standard Copilot.cx events and explanation about their implementation.
💡 In all events
screenName
property is optional. In case using this property it's value must match between Android and iOS.
Account Creation Events
Sign up
Trigger upon receiving a confirmation from Copilot.cx that the account was created.
💡 Sign up event should be sent also when user signs up anonymously.
💡 Since version 3.2.0 of the Copilot.cx Sphere SDK the
Signup
event is dispatched automatically when successful signup occurs for regular user and anonymous user using the Email and password registration or Anonymous registration commands.
Copilot.instance.report.log(event: SignupAnalyticsEvent())
Copilot.getInstance().Report.logEvent(new SignupAnalyticsEvent());
Copilot.getInstance().Report.logEvent(SignupAnalyticsEvent())
Login
Trigger after receiving confirmation for successful login.
💡 Login event should not be reported in the case of silent log in.
💡 Since version 3.2.0 of the Copilot.cx Sphere SDK the
Login
event is dispatched automatically when successful login occurs using the Login with email and password command.
Copilot.instance.report.log(event: LoginAnalyticsEvent())
Copilot.getInstance().Report.logEvent(new LoggedInAnalyticsEvent());
Copilot.getInstance().Report.logEvent(LoggedInAnalyticsEvent())
Logout
Trigger after successful logout.
Copilot.instance.report.log(event: LogoutAnalyticsEvent())
Copilot.getInstance().Report.logEvent(new LoggedOutAnalyticsEvent());
Copilot.getInstance().Report.logEvent(LoggedOutAnalyticsEvent())
Successful Elevate Anonymous
Trigger upon successful elevation of anonymous user to a registered user.
💡 Since version 3.2.0 of the Copilot.cx Sphere SDK the
Successful elevate anonymous
event is dispatched automatically when user is successfully elevated to regular user using the Elevate anonymous user command.
Copilot.instance.report.log(event: SuccessfulElevateAnonymousAnalyticEvent())
Copilot.getInstance().Report.logEvent(new SuccessfulElevateAnonymousAnalyticsEvent());
Copilot.getInstance().Report.logEvent(SuccessfulElevateAnonymousAnalyticsEvent())
User Actions
Accept Terms of use
Trigger after user accepted terms and condition. This event has a version
property which indicates the version of the T&C file the user agreed to.
💡 Since version 3.2.0 of the Copilot.cx Sphere SDK the
Accept terms of use
event is dispatched automatically when Copilot.cx user is updated with terms of use approval successfully using the Approve terms of use command.
For example, reporting event for accepting terms of use of version - document version 1.7:
Copilot.instance.report.log(event: AcceptTermsAnalyticsEvent(version: "1.7"))
Copilot.getInstance().Report.logEvent(new AcceptTermsAnalyticsEvent("1.7"));
Copilot.getInstance().Report.logEvent(AcceptTermsAnalyticsEvent("1.7"))
Contact support
Trigger when a user taps a button to contact support. Event properties:
supportCase
(String) - Indicating the support case description.thingId
(String) - The specific thing the user would like to get support for (Optional).screenName
(String) - The screen which the user interacted with to file the support case (Optional).
Copilot.instance.report.log(event: ContactSupportAnalyticsEvent(
supportCase: "I need help", thingId: "33:22:1B:23:6A", screenName: "SupportScreen"))
Copilot.getInstance().Report.logEvent(
new ContactSupportAnalyticsEvent("SupportScreen", "I need help", "33:22:1B:23:6A"));
Copilot.getInstance().Report.logEvent(
ContactSupportAnalyticsEvent("SupportScreen", "I need help", "33:22:1B:23:6A"))
Onboarding Events
Onboarding Started / Ended
These two events should be sent in the beginning and the end of the onboarding process.
Copilot.cx general definition is that onboarding starts right after a user signs up, and ends after a successful connection to the thing. However, this is a business definition, and may vary between apps. Place these events at your discretion.
Capturing these events enables calculating Onboarding Success Percentage in Copilot.cx dashboard, and target users who have started the onboarding process, but failed to complete it.
💡 For both events
screenName
property is optional.
Copilot.instance.report.log(event: OnboardingStartedAnalayticsEvent(flowID: "fromPush"))
Copilot.instance.report.log(event: OnboardingEndedAnalyticsEvent(flowID: "fromPush", screenName: "MainScreen"))
Copilot.getInstance().Report.logEvent(
new OnBoardingStartedAnalyticsEvent("fromPush", null)
Copilot.getInstance().Report.logEvent(
new OnBoardingEndedAnalyticsEvent("fromPush", "MainScreen"));
Copilot.getInstance().Report.logEvent(
OnBoardingStartedAnalyticsEvent("fromPush", null))
Copilot.getInstance().Report.logEvent(
OnBoardingEndedAnalyticsEvent("fromPush", "MainScreen"))
Thing Events
Tap connect device
Trigger when a user taps a button to start the process of connecting to a thing.
Copilot.instance.report.log(event: TapConnectDeviceAnalyticsEvent())
Copilot.getInstance().Report.logEvent(new TapConnectDeviceAnalyticsEvent());
Copilot.getInstance().Report.logEvent(TapConnectDeviceAnalyticsEvent())
Thing connected
Trigger when a communication between the app and the device was established successfully.
💡 This event must include the device's
thingId
(the unique physical id of the device, matching also the value in the modelthingInfo.thingId
) as a property.
Copilot.instance.report.log(event:
ThingConnectedAnalyticsEvent(thingID: "33:22:1B:23:6A", screenName: "MainScreen"))
Copilot.getInstance().Report.logEvent(
new ThingConnectedAnalyticsEvent("33:22:1B:23:6A", "MainScreen"));
Copilot.getInstance().Report.logEvent(
ThingConnectedAnalyticsEvent("33:22:1B:23:6A", "MainScreen"))
Thing discovered
Trigger when there's an indication from client apps that a thing was discovered through BLE, WiFi etc. This event will be used to differentiate between users who have a thing but failed to connect it, and users who don't have a thing.
💡
thingId
is an optional field
Copilot.instance.report.log(event:
ThingDiscoveredAnalyticsEvent(thingID: "33:22:1B:23:6A"))
Copilot.getInstance().Report.logEvent(
new ThingDiscoveredAnalyticsEvent("optionalThingId"));
Copilot.getInstance().Report.logEvent(
ThingDiscoveredAnalyticsEvent("optionalThingId"))
Thing info
Use this event to send additional information about the physical device and should be sent right after the Thing Connected event, as soon as Thing model and firmware are available.
💡 This event must include the device's
thingId
(the unique physical id of the device, matching also the value in the modelthingInfo.thingId
) as a property.
Copilot.instance.report.log(event: ThingInfoAnalyticsEvent(
thingFirmware: "1.0.22", thingModel: "Spaceship - Rev(A)", thingId: "33:22:1B:23:6A"))
Copilot.getInstance().Report.logEvent(
new ThingInfoAnalyticsEvent("1.0.22", "Spaceship - Rev(A)", "33:22:1B:23:6A"));
Copilot.getInstance().Report.logEvent(
ThingInfoAnalyticsEvent("1.0.22", "Spaceship - Rev(A)", "33:22:1B:23:6A"))
Thing Connection Failed
- Trigger when failing to connect to a thing. Possible values for example are
No Bluetooth
/Timeout
/Thing not found
etc.
Copilot.instance.report.log(event:
ThingConnectionFailedAnalyticsEvent(failureReason: "Timeout"))
Copilot.getInstance().Report.logEvent(
new ThingConnectionFailedAnalyticsEvent("Timeout"));
Copilot.getInstance().Report.logEvent(
ThingConnectionFailedAnalyticsEvent("Timeout"))
Consumable Usage
Trigger this event in case your product has a consumable element (paper, cartridge, razor, etc…) and a user consumes it. This will later be used to identify consumable usage patterns and deviations from these patterns.
thingId
(String) - The specific thing the user would like to get support for (Optional).consumableType
(String) If you have several types of consumables, add the consumable type as a parameter (Optional).screenName
(String) The screen which the user interacted with to file the support case (Optional).
Copilot.instance.report.log(event:
ConsumableUsageAnalyticsEvent(thingId: "33:22:1B:23:6A", consumableType: "Ink", screenName: "PrintingScreen"))
Copilot.getInstance().Report.logEvent(
new ConsumableUsageAnalyticsEvent("PrintingScreen", "Ink", "33:22:1B:23:6A"));
Copilot.getInstance().Report.logEvent(
ConsumableUsageAnalyticsEvent("PrintingScreen", "Ink", "33:22:1B:23:6A"))
Consumable Depleted
Trigger this event in case your product has a consumable element (paper, cartridge, razor, etc…) and a user has depleted their current stock based on device reports or any other method of managing the User’s consumable stock. For example, a printer that reports paper empty or a counter in your app.
thingId
(String) - The specific thing the user would like to get support for (Optional).consumableType
(String) If you have several types of consumables, add the consumable type as a parameter (Optional).screenName
(String) The screen which the user interacted with to file the support case (Optional).
Copilot.instance.report.log(event:
ConsumableDepletedAnalyticsEvent(thingId: "33:22:1B:23:6A", consumableType: "Ink", screenName: "PrintingScreen"))
Copilot.getInstance().Report.logEvent(
new ConsumableDepletedAnalyticsEvent("33:22:1B:23:6A", "Ink", "PrintingScreen"));
Copilot.getInstance().Report.logEvent(
ConsumableDepletedAnalyticsEvent("PrintingScreen", "Ink", "33:22:1B:23:6A"))
General Events
Screen Load
Trigger when a new app screen appears on the user’s screen, for example: login/register.
💡 Screen names should be matching between the platforms and no platform specific. Avoid using the screens names like
SignupViewController
orFriendsListFragment
but useSignupScreen
andFriendsListScreen
.
Copilot.instance.report.log(event: ScreenLoadAnalyticsEvent(screenName: "FriendsListScreen"))
Copilot.getInstance().Report.logEvent(new ScreenLoadAnalyticsEvent("FriendsListScreen"));
Copilot.getInstance().Report.logEvent(ScreenLoadAnalyticsEvent("FriendsListScreen"))
Tap Menu
Trigger when user opens any type of menu.
Copilot.instance.report.log(event: TapMenuAnalyticsEvent(screenName: "MainScreen"))
Copilot.getInstance().Report.logEvent(
new TapMenuAnalyticsEvent("MainScreen"));
Copilot.getInstance().Report.logEvent(
TapMenuAnalyticsEvent("MainScreen"))
Tap Menu Item
Trigger when a user taps an item in the menu.
Event property menuItem should pass the name of the item the user selected. For example: Settings/FAQ/Terms and Conditions etc.
Copilot.instance.report.log(event: TapMenuItemAnalyticsEvent(menuItem: "Settings"))
Copilot.getInstance().Report.logEvent(new TapMenuItemAnalyticsEvent("Settings", null));
Copilot.getInstance().Report.logEvent(TapMenuItemAnalyticsEvent("Settings", null))
Firmware upgrade started
Trigger these events at the beginning and the end of a firmware upgrade process.
Copilot.instance.report.log(event: FirmwareUpgradeStartedAnalyticsEvent())
Copilot.getInstance().Report.logEvent(new FirmwareUpgradeStartedAnalyticsEvent());
Copilot.getInstance().Report.logEvent(FirmwareUpgradeStartedAnalyticsEvent())
Firmware upgrade completed
Trigger upon upgrade completion, attach a FirmwareUpgradeCompletedStatus
property to the event, with possible values of Success
or Failure
.
Copilot.instance.report.log(event:
FirmwareUpgradeCompletedAnalyticsEvent(firmwareUpgradeStatus: .Success))
Copilot.getInstance().Report.logEvent(
new FirmwareUpgradeCompletedAnalyticsEvent
(FirmwareUpgradeCompletedAnalyticsEvent.FirmwareUpgradeCompletedStatus.Success));
Copilot.getInstance().Report.logEvent(
FirmwareUpgradeCompletedAnalyticsEvent(
FirmwareUpgradeCompletedAnalyticsEvenFirmwareUpgradeCompletedStatus.Success))
Error Report
Trigger this optional event to track errors that occur while using the app. Example of such errors: No Bluetooth/Timeout/Connection Failed/etc.
Copilot.instance.report.log(event:
ErrorAnalyticsEvent(errorType: "CustomError", screenName: "SettingsScreen"))
Copilot.getInstance().Report.logEvent(
new ErrorAnalyticsEvent("CustomError", "SettingsScreen"));
Copilot.getInstance().Report.logEvent(
ErrorAnalyticsEvent("CustomError", "SettingsScreen"))