Get an advertiser and test group ID
The justtrack SDK can provide you with the advertiser ID of the user if the user didn't limit ad tracking. Additionally, users are divided into three test groups (1, 2, and 3) based on their advertiser ID. You can retrieve that test group ID from the SDK, implement a different logic for one of the test groups, and then compare the (different) performance of that group on the justtrack dashboard.
- Java
- Kotlin
Future<AdvertiserIdInfo> infoFuture = sdk.getAdvertiserIdInfo();
@NonNull AdvertiserIdInfo info = infoFuture.get();
@Nullable String advertiserId = info.getAdvertiserId();
boolean isLimitedAdTracking = info.isLimitedAdTracking();
log("My advertiser ID is " + advertiserId);
log("Ad tracking is limited = " + isLimitedAdTracking);
Future<Integer> testGroupIdFuture = sdk.getTestGroupId();
@Nullable Integer testGroupId = testGroupIdFuture.get();
log("My test group ID is " + testGroupId);
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")