Home


Analytics

The connector library allows you to send custom events to the hooked analytics networks.

Simple event:
Enhance.logEvent("game_over");
Event with a single parameter:
Enhance.logEvent("game_over", "level", "1");
Event with multiple parameters:
Enhance.logEventWithParameters("game_over", {level: "1", time: "1:29", difficulty: "hard"});

Methods

Enhance.logEvent

void Enhance.logEvent(
    String eventType,
    optional String paramKey = null,
    optional String paramValue = null
)

Send a custom analytics event.

Parameters:

String  eventType - Type (name) of the event.

optional String  paramKey - Key of the event's parameter.

optional String  paramValue - Value of the event's parameter.

Enhance.logEventWithParameters

void Enhance.logEventWithParameters(
    String eventType,
    Object params
)

Send a custom analytics event with named parameters attached.

Parameters:

String  eventType - Type (name) of the event.

Object  params - A collection of key - value pairs.