Such events can be used to meet personalized analysis requirements that cannot be met by automatically collected events or predefined events.
Analytics Kit allows you to customize events and extend event parameters, or add personalized parameters for predefined events.
For example, you can add a custom event named begin_examination for an education app to indicate the event of entering a new exam and add parameters to this event to meet your analysis needs. The following example is for your reference:
// Enable tracking of the custom event in proper positions of the code.
let eventId = "begin_examination";
let eventParams = {
"exam_difficulty":"high",
"exam_level": "1-1",
"exam_examination": "20190520"
};
analytics.onEvent(eventId, eventParams);
You do not need to set the TASKID, PREPAGEID, and CURRPAGEID parameters for event tracking because they are automatically collected in custom events.
After configuring event tracking, you need to register the custom event and related parameters in AppGallery Connect. For details, please refer to Events. When an event is triggered, you can view the analysis report on the Real-time overview page.