Menu

Duration Events

       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.


Create Duration Event

      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)
ParameterDescriptionTypeRequired
timerEventNameCustom duration event nameStringYes

Sample Code

SolarEngine.Analytics.eventStart("xxxx");


Report Duration Event

       Call eventFinish to report duration event:

Function

public static void eventFinish(string timerEventName, Dictionary<string, object> attributes)

Parameters:

ParameterDescriptionTypeRequired
timeEventDataCustom duration event namestringYes
attributesCustom duration event propertyDictionary<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);



Previous
Custom Events
Next
First-Time Event
Last modified: 2024-12-04Powered by