Skip to main content
Version: SDK 5.0.x

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.

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);
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.