AnalyticsDelegate
A class that manages the analytics system. This class is responsible for writing events to the event queue and managing the trackers that collect certain information about the game.
Functions
RegisterTracker
AnalyticsDelegate:
RegisterTracker
(
trackerId:
string
,
tracker:
any
) →
(
)
Registers a tracker with the analytics delegate. This allows the tracker to write events to the event queue.
AnalyticsDelegate:RegisterTracker("PlayerTracker", PlayerTracker.new({
EventQueue = self._eventQueue,
Debug = self._eventQueue.Debug
}))
GetTracker
AnalyticsDelegate:
GetTracker
(
trackerId:
string
) →
(
)
Fetches a tracker with the given trackerId.
WriteEvent
AnalyticsDelegate:
WriteEvent
(
eventName:
string
,
eventData:
{
[
string
]
:
any
}
) →
(
)
Writes an event to the event queue.
WritePlayerEvent
AnalyticsDelegate:
WritePlayerEvent
(
) →
(
)
Writes a player event to the event queue.
SetDebugEnabled
AnalyticsDelegate:
SetDebugEnabled
(
enabled:
boolean
) →
(
)
Sets whether debug messages should be printed. Useful to tie into CMDR