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).
Function
public static void eventStart(string timerEventName)
Parameter | Description | Type | Required |
---|---|---|---|
timerEventName | Custom duration event name | String | Yes |
Sample Code
SolarEngine.Analytics.eventStart("xxxx");
Call eventFinish to report duration event:
Function
public static void eventFinish(string timerEventName, Dictionary<string, object> attributes)
Parameters:
Parameter | Description | Type | Required |
---|---|---|---|
timeEventData | Custom duration event name | string | Yes |
attributes | Custom duration event property | Dictionary<string, object> | No |
Sample Code
Dictionary<string, object> dict = new Dictionary<string, object>();
dict.Add("K1", "V1");
dict.Add("K2", "V2");
dict.Add("K3", 2);
SolarEngine.Analytics.trackTimerEvent("xxx",dict);