Getting Started

Installation#

Tracking library is hosted in Teko private repos, for access guide please refer to Teko repository access guide
The library use TerraApp to manage configuration, so your app must implement TerraApp first. For guidance please refer here Quick start Then add following dependency to your build.gradle.kts

implementation("vn.teko.android.tracker:tracker-manager:$version")

Initialize Library#

val terraApp = TerraApp.getInstance()
val terraTracker = TerraTracker.getInstance(terraApp)

Setup Common Parameters#

There are some common parameters that are tracked in every events. Use below API to set them as soon as your app have the information.

Set userId#

userId is a string uniquely identify an user. You can get this from Identify system like Teko IAM Service, or your own identity system. You should pass userId to tracker lib as soon as you identified the user.

terraTracker.getInstance().setUserId("<your_user_id>")

Set phone number#

This is optional. Set this value so it will be sent to network.phoneNumber param in the event.

terraTracker.getInstance().setPhoneNumber("<your_user_phone_number>")