Report
Report component is responsible for all of the commands that are related to event logging and reporting.
Managing providers
Copilot.cx SDK supports the main event logging providers, such as Firebase, Google Analytics, Facebook, Fabric etc. Also, you may use multiple providers in your mobile application.
Upon launching your application, call the setup()
method on Copilot.cx in your AppDelegate
(iOS) or the Application
(Android) classes (as described in importing the SDK for Android and iOS sections) and provide objects that conform to the EventLogProvider
protocol
/interface
.
When logging events using the Report component, it will address each report to every event logging provider Copilot.cx was initialized with.
💡 You can use the Reports component to log event only once and the reported event will be distributed to multiple event logging providers, according to the event and provider group setup.
let firebaseEventLogProvider = FirebaseAnalyticsProvider()
let consoleLogEventLogProvider = ConsoleLogEventProvider() // Your own implementation of the `EventLogProvider` protocol for debugging purposes.
Copilot.setup(analyticsProviders: [firebaseProvider, consoleLogEventLogProvider])
List<EventLogProvider> providers = new ArrayList<EventLogProvider>();
providers.add(new FirebaseAnalyticsEventLogProvider(getApplicationContext()));
providers.add(new DebugLogsEventLogProvider()); // Your own implementation of the `EventLogProvider` interface for debugging purposes.
Copilot.setup(getApplicationContext(), providers);
val providers = arrayListOf(
FirebaseAnalyticsEventLogProvider(applicationContext),
DebugLogsEventLogProvider()
)
Copilot.setup(applicationContext, providers)
Reporting events
Copilot.cx events capture important actions typically performed by a user using the application or the physical product (thing). Additional information regarding the events can be passed via event properties. Event properties help provide context about why and how an action occurred.
Predefined Events
Copilot.cx SDK comes with a predefined set of standard events, that are commonly used in Consumer IoT apps. These events need to be called at the right places in your code. Implementing Copilot.cx Predefined Events correctly is necessary in order to leverage the power of Copilot. Please refer the Predefined events section for detailed setup details.
Custom Events
Custom events can be used when you want to track user behavior that doesn't match one of the predefined events. Please refer the Custom events section for detailed setup details.