Documentation

Documentation

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

›Event reporting guide

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

Predefined events

Below is the list of the standard Copilot 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 that the account was created.

💡 Sign up event should be sent also when user signs up anonymously.

iOS
Android
Copilot.instance.report.log(event: SignupAnalyticsEvent())
Copilot.getInstance().Report.logEvent(new SignupAnalyticsEvent());

Login

Trigger after receiving confirmation for successful login.

💡 Login event should not be reported in the case of silent log in.

iOS
Android
Copilot.instance.report.log(event: LoginAnalyticsEvent())
Copilot.getInstance().Report.logEvent(new LoggedInAnalyticsEvent());

Logout

Trigger after successful logout.

iOS
Android
Copilot.instance.report.log(event: LogoutAnalyticsEvent())
Copilot.getInstance().Report.logEvent(new LoggedOutAnalyticsEvent());

Successful Elevate Anonymous

Trigger upon successful elevation of anonymous user to a registered user. Upon successful elevation.

iOS
Android
Copilot.instance.report.log(event: SuccessfulElevateAnonymousAnalyticEvent())
Copilot.getInstance().Report.logEvent(new 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.

For example, reporting event for accepting terms of use of version - document version 1.7:

iOS
Android
Copilot.instance.report.log(event: AcceptTermsAnalyticsEvent(version: "1.7"))
Copilot.getInstance().Report.logEvent(new 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).
iOS
Android
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"));

Onboarding Events

Onboarding Started / Ended

These two events should be sent in the beginning and the end of the onboarding process.

Copilot 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 dashboard, and target users who have started the onboarding process, but failed to complete it.

💡 For both events screenName property is optional.

iOS
Android
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"));

Thing Events

Tap connect device

Trigger when a user taps a button to start the process of connecting to a thing.

iOS
Android
Copilot.instance.report.log(event: TapConnectDeviceAnalyticsEvent())
Copilot.getInstance().Report.logEvent(new 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 model thingInfo.thingId) as a property.

iOS
Android
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"));

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

iOS
Android
Copilot.instance.report.log(event:
ThingDiscoveredAnalyticsEvent(thingID: "33:22:1B:23:6A"))
Copilot.getInstance().Report.logEvent(
new 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 model thingInfo.thingId) as a property.

iOS
Android
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"));

Thing Connection Failed

  • Trigger when failing to connect to a thing. Possible values for example are No Bluetooth/Timeout/Thing not found etc.
iOS
Android
Copilot.instance.report.log(event:
ThingConnectionFailedAnalyticsEvent(failureReason: "Timeout"))
Copilot.getInstance().Report.logEvent(
new 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).
iOS
Android
Copilot.instance.report.log(event:
ConsumableUsageAnalyticsEvent(thingId: "33:22:1B:23:6A", consumableType: "Ink", screenName: "PrintingScreen"))
Copilot.getInstance().Report.logEvent(
new ConsumableUsageAnalyticsEvent("33:22:1B:23:6A", "Ink", "PrintingScreen"));

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).
iOS
Android
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"));

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 or FriendsListFragment but use SignupScreen and FriendsListScreen.

iOS
Android
Copilot.instance.report.log(event: ScreenLoadAnalyticsEvent(screenName: "FriendsListScreen"))
Copilot.getInstance().Report.logEvent(new ScreenLoadAnalyticsEvent("FriendsListScreen"));

Tap Menu

Trigger when user opens any type of menu.

iOS
Android
Copilot.instance.report.log(event: TapMenuAnalyticsEvent(screenName: "MainScreen"))
Copilot.getInstance().Report.logEvent(
new 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.

iOS
Android
Copilot.instance.report.log(event: TapMenuItemAnalyticsEvent(menuItem: "Settings"))
Copilot.getInstance().Report.logEvent(new TapMenuItemAnalyticsEvent("Settings"));

Firmware upgrade started

Trigger these events at the beginning and the end of a firmware upgrade process.

iOS
Android
Copilot.instance.report.log(event: FirmwareUpgradeStartedAnalyticsEvent())
Copilot.getInstance().Report.logEvent(new FirmwareUpgradeStartedAnalyticsEvent());

Firmware upgrade completed

Trigger upon upgrade completion, attach a FirmwareUpgradeCompletedStatus property to the event, with possible values of Success or Failure.

iOS
Android
Copilot.instance.report.log(event:
FirmwareUpgradeCompletedAnalyticsEvent(firmwareUpgradeStatus: .Success))
Copilot.getInstance().Report.logEvent(
new FirmwareUpgradeCompletedAnalyticsEvent
(FirmwareUpgradeCompletedAnalyticsEvent.FirmwareUpgradeCompletedStatus.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.

iOS
Android
Copilot.instance.report.log(event:
ErrorAnalyticsEvent(errorType: "CustomError", screenName: "SettingsScreen"))

Copilot.getInstance().Report.logEvent(
new ErrorAnalyticsEvent("CustomError", "SettingsScreen"));
← AuthenticationCustom events →
  • Account Creation Events
    • Sign up
    • Login
    • Logout
    • Successful Elevate Anonymous
  • User Actions
    • Accept Terms of use
    • Contact support
  • Onboarding Events
    • Onboarding Started / Ended
  • Thing Events
    • Tap connect device
    • Thing connected
    • Thing discovered
    • Thing info
    • Thing Connection Failed
    • Consumable Usage
    • Consumable Depleted
  • General Events
    • Screen Load
    • Tap Menu
    • Tap Menu Item
    • Firmware upgrade started
    • Firmware upgrade completed
    • Error Report
Copilot
Mail: hello@copilot.cx
Call: (212).398.0001
© Copilot 2021