Capturing analytics

You can initialize the MobileFirst Analytics SDK and enable the capture of lifecycle and network analytic data.

About this task

The MobileFirst Analytics API allows for the capturing of the following metrics.
The initialization of the analytics API must be written in native code, even in Cordova apps.
  • To capture app usage, you must register app lifecycle event listeners before the event to which you are listening occurs.
  • To use the file system or native language and device features, the API must be initialized. If the API is used in a way that requires native device features (like the file system), but was not initialized, the API call fails. This behavior is especially true on Android.
Note: No listeners are required for the web apps.

To initialize the MobileFirst Analytics SDK and enable the capture of lifecycle and network analytic data: