Skip to main content

Auto-tracking

Last updated 08/27/2026

The TDAnalytics SDK supports auto-tracking of three events:

  • appInstall: Game install. This event is collected when the game is opened for the first time after installation (event name ta_app_install)
  • appStart: This event is collected when the game enters the foreground (event name ta_app_start)
  • appEnd: This event is collected when the game moves to the background (event name ta_app_end)

Call enableAutoTrack() to enable auto-tracking:

-- Enable auto-tracking. Default false: disabled; true: enabled
local autoTack = {
appInstall = true, -- Enable auto-tracking of the install event
appStart = true, -- Enable auto-tracking of the start event
appEnd = true -- Enable auto-tracking of the end event
}
TDAnalytics.enableAutoTrack(autoTack)

Note: If you need a custom distinct ID, make sure you call the setDistinctId API to set the distinct ID before you enable auto-tracking.

Was this page helpful?