Analytics and Reporting

Custom Events

Custom events let you track user activities and key conversions in your application, and tie them back to corresponding push messaging campaigns. Custom events requires analytics to be enabled. If disabled, any event that is added to analytics will be ignored. For a more detailed explanation on custom events and possible use cases, see the Custom Events topic guide.

Example custom event
var customEvent = new UACustomEvent("event name", 100.0)
customEvent.addProperty("custom key", "some value");

UrbanAirship.addCustomEvent(customEvent);

Screen Tracking

The Airship React Native module gives you the ability to track what screen a user views within the application, as well as how long the user stayed on that screen and the user’s previous screen. These events then come through Airship Real-Time Data Streaming and allow you to see the path that a user takes through an application, or to trigger actions based on a user visiting a particular area of the application.

Track a screen
UrbanAirship.trackScreen(screen)

When a new screen is tracked or when the application backgrounds, a screen tracking event will be generated. Normally, screen tracking should be called in a widgets’s build function to generate a tracking event each time the widget appears, however it can be called anywhere in the application to start tracking a new screen event.