Logging a Normal Event with a Numeric Field
The RUISDK.TrackEventNumeric function logs a normal event with the supplied data, including a custom numeric field.
The RUISDK.TrackEventNumeric function can be called between RUISDK.StartSDK and RUISDK.StopSDK, and can be called zero or more times.
The RUISDK.TrackEventNumeric function can be called while a New Registration is being performed (RUISDK.CreateConfig, RUISDK.StartSDK). However, the event data is not written to the log file until the New Registration completes, and if the New Registration fails, the data will be lost.
The RUISDK.TrackEventNumeric function is an asynchronous function, returning immediately with further functionality executed on separate thread(s).
RUIResult RUISDK.TrackEventNumeric (String eventCategory, String eventName, Double customValue, String sessionID = “”)
Parameters
The RUISDK.TrackEventNumeric function has the following parameters.
Parameter |
Description |
|||||||||||||||
eventCategory (String) |
The name of the category of this event. This parameter is optional (set to string.Empty or null if not required). Unlike V4 of the Usage Intelligence SDK, there is no concept of extended names (for eventCategory and eventName). The content of eventCategory and eventName is conditioned and validated (after conditioning) with the following rules:
|
|||||||||||||||
eventName (String) |
The name of the event to be tracked. Unlike V4 of the Usage Intelligence SDK, there is no concept of extended names (for eventCategory and eventName). The content of eventCategory and eventName is conditioned and validated (after conditioning) with the following rules:
|
|||||||||||||||
customValue (double) |
A numeric custom value related to this particular event. |
|||||||||||||||
sessionID (String) |
If multiple user sessions are supported within the application (multiSessionEnabled = true), this should contain the unique ID that refers to the user session in which the event occurred. It must be a current valid value used RUISDK.StartSession. If the application supports only a single session (multiSessionEnabled = false), then this value should be empty. |
Returns
The RUISDK.TrackEventNumeric function returns a RUIResult enum value with the following possible values.
Return |
Description |
ok |
Function successful. |
sdkInternalErrorFatal |
Irrecoverable internal fatal error. No further API calls should be made. |
sdkAborted |
A required New Registration has failed, and hence the SDK is aborted. RUISDK.StopSDK and RUISDK destructor are possible. |
suspended |
Instance has been instructed by Server to back-off. Will return to Running once back-off cleared. |
permanentlyDisabled |
Instance has been instructed by Server to disable. This is permanent, irrecoverable state. |
sdkOptedOut |
Instance has been instructed by the application to opt-out. |
configNotCreated |
Configuration has not been successfully created. |
sdkNotStarted |
SDK has not been successfully started. |
sdkAlreadyStopped |
SDK has already been successfully stopped. |
invalidSessionIDExpectedEmpty |
The sessionID is expected to be empty, and it was not. |
invalidSessionIDExpectedNonEmpty |
The sessionID is expected to be non-empty, and it was not. |
invalidSessionIDTooShort |
The sessionID violates its allowable minimum length. |
invalidSessionIDTooLong |
The sessionID violates its allowable maximum length. |
invalidSessionIDAlreadyActive |
The sessionID is already currently in use. |
invalidParameterExpectedNonEmpty |
Some API parameter is expected to be non-empty, and is not. |