Skip to main content
Version: SDK 6.0.x

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.

const advertiserInfo: JustTrackSdk.AdvertiserIdInfo = await JustTrackSdk.getAdvertiserIdInfo();
const advertiserId: String | null = advertiserInfo.advertiserId;
const isLimitedAdTracking: boolean = advertiserInfo.isLimitedAdTracking;
console.log('My advertiser ID is '+ advertiserId)
console.log('Ad tracking is limited is '+ isLimitedAdTracking)

const testGroupId: JustTrackSdk.TestGroupId | null = await JustTrackSdk.getTestGroupId();
console.log('My test group ID is '+ testGroupId)
info

For Android, if the user enables debug logging then the testGroupId will be null. Also if the GAID of the phone is deleted then the advertiserId and testGroupId is also null.