Get an advertiser and test group ID
The justtrack SDK can provide the advertiser ID of the user if the user didn't limit ad tracking. Additionally, users are assigned to one of three test groups (1, 2, or 3) based on their advertiser ID. You can retrieve the test group ID from the SDK, implement different logic for a specific group, and compare that group’s performance in the justtrack dashboard.
val infoFuture: Future<AdvertiserIdInfo> = sdk.advertiserId
val info: AdvertiserIdInfo = infoFuture.get()
val advertiserId: String? = info.advertiserId
val isLimitedAdTracking: Boolean = info.isLimitedAdTracking
log("My advertiser ID is $advertiserId")
log("Ad tracking is limited = $isLimitedAdTracking")
val testGroupIdFuture: Future<Int> = sdk.testGroupId
val testGroupId: Int? = testGroupIdFuture.get()
log("My test group ID is $testGroupId")
info
If the user enables debug logging
then the testGroupId
will be null.
If the GAID
of the phone is deleted then the advertiserId
and testGroupId
is also null.