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)

You can enable auto-tracking by configuring the initialization parameters:

-- Enable auto-tracking
-- appInstall = enable auto-tracking of the install event
-- appStart = enable auto-tracking of the start event
-- appEnd = enable auto-tracking of the end event
local params = {
appId = "YOUR_APP_ID",
serverUrl = "YOUR_SERVER_URL",
autoTrack = {
"appStart", "appEnd", "appInstall"
}
}
TDAnalytics.init( params )

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?