appOpened

:appOpened( callback )

Sends the built-in "AppOpened" event to Coronium for Analytics.

Parameters

Name Details
callback The callback function. If not provided the global callback will be used. (Function, optional)

Returns

Examples

local function onAppOpened( event )
  if not event.error then
    print( event.result )
  end
end

coronium:appOpened( onAppOpened )

addEvent

:addEvent( eventType, eventTag , callback )

Sends a custom analytical event to Coronium for tracking.

Parameters

Name Details
eventType A custom name of the event that you want to track. (String, required)
eventTag A custom tag used for event options. (String, required)
callback The callback function. If not provided the global callback will be used. (Function, optional)

Returns

Examples

local function onAddEvent( event )
  if not event.error then
    print( event.result )
  end
end

coronium:addEvent( "MyEvent", "MyEventTag", onAddEvent )

removeEvent

:removeEvent( eventType, eventTag, amount , callback )

Decreases custom analytical event by amount (default: 1).

Parameters

Name Details
eventType The custom name of the event that you created. (String, required)
eventTag A custom tag used for event options. (String, required)
amount For numerical values. (Number, optional)
callback The callback function. If not provided the global callback will be used. (Function, optional)

Returns

Examples


dropEvent

:dropEvent( eventType , callback )

Removes custom event and all event tags.

Parameters

Name Details
eventType The custom name of the event that you created. (String, required)
callback The callback function. If not provided the global callback will be used. (Function, optional)

Returns

Examples

Heads Up!

This will remove ALL records for the event, be careful!


dropEventTag

:dropEventTag( eventType, eventTag , callback )

Removes tag for a custom event.

Parameters

Name Details
eventType The custom name of the event that you created. (String, required)
eventTag The tag name to remove. (String, required)
callback The callback function. If not provided the global callback will be used. (Function, optional)

Returns

Examples

Heads Up!

This will remove ALL records for the tag, be careful!