Skip to main content

Custom Event

API Definition

Tingyun.recordEvent(options);

Parameters

  • options: Event configuration object.
    • name: Event name. String type. Required.
    • msg: Event message. String type. Optional.
    • status: Event status. String type. Optional.
    • context: Additional data included in the operation. Object type. Optional.

Example

Create an event in a warning message popup.

function messageBox(data) {
// Create event and set detailed information to additional info
Tingyun.recordEvent({
name: data.title,
msg: data.msg,
status: data.level,
context: {
detail: data.detail
}
});
}