This page helps you to understand the types of events and how to setup a custom event.
An event is any activity that a user or the system performs on the application. Analyzing events helps in understanding how users interact with an application. The events play an essential role in decision-making.
There are three types of app events in the Contlo SDK:
System events
These events are fired automatically by the SDK.
- App launched: This event is fired when the app is launched from the background or killed state.
- App installed: This event is fired when a user installs or reinstalls the app, or clears app data, and launches it for the first time.
- App backgrounded: This event is fired when the app is sent into the background state.
- App updated: This event is fired when a user opens the app for the first time after updating.
Message events
These events are related to push notifications that are automatically sent to Contlo.
- Mobile push received: This event is fired when the SDK receives the notification payload from Contlo.
- Mobile push clicked: This event is fired when the user clicks the notification.
- Mobile push dismissed - This event is fired when the user dismisses the notification or clicks the Clear all notifications button.
Custom events
These events are the user journey events that you would track across the user journey. You can send the custom events using the sendEvent()
method. Refer to the code given below:
void sendEvent() async {
String data = await ContloPlugin.sendEvent({
"event": eventName,
"properties": {
eventDetails['key']: eventDetails['value']
},
"profile_properties": {
profileDetails['key']: profileDetails['value']
},
});
print("Event response: $data");
}