When reporting the preset event _appEnd, the duration starting from the last _appStart will be reported by default. That is, the duration of an exit event does not need to be configured additionally.
It should be noted that there can only be one timing task for the same event. If set multiple times, only the last setting will take effect.
Call eventStart
to start timing. Configure the event name, and event properties to report. When the event comes to an end, a "_duration" property will automatically be added for this event (unit: millisecond).
Parameter | Description | Type | Required |
---|---|---|---|
eventName | Custom duration event name | String | Yes |
Sample Code
solarengine.eventStart("test");
Call eventFinish
to report duration event:
Parameters:
Parameter | Description | Type | Required |
---|---|---|---|
eventName | Custom duration event name | string | Yes |
customProperties | Custom duration event property | object | No |
Sample Code
let customProperties = {
test1:"key1",
test2:2,
test3:[1,"2"]
}
solarengine.eventFinish("test",customProperties);
Note:
When reporting the preset event _appEnd, the duration will be automatically calculated based on the time elapsed since the last _appStart. This means the duration of the _appEnd event does not need to be manually configured, as it will be assigned by default.