SDK
HomePromoteAnalyzeDevelopResources
4.5.0
4.5.0
  • SDK Overview
    • Tracking Documentation
      • Android
      • iOS & SKAdNetwork
      • Retargeting
    • Predefined Events
    • Find your justtrack token
  • Android
    • Overview
      • Retargeting users
      • Revenue
      • UserEvent API
      • Demo
      • Changelog
    • Set up the SDK
    • Send user events
    • Get the justtrack user ID
    • Get an attribution
    • Get an advertiser and test group ID
    • Integrate third-party SDKs
  • iOS
    • Overview
      • Track sessions
      • UserEvent API
      • Changelog
    • Set up the SDK
    • Send user events
    • Get the justtrack user ID
    • Get an attribution
    • Get an advertiser and test group ID
    • Integrate third-party SDKs
    • Request tracking authorization
  • Unity
    • Overview
      • Forward Ad Impressions
      • UserEvent API
      • Changelog
    • Install the SDK
    • Install the dependencies
    • Add the prefab
    • Send user events
    • Get a justtrack user ID
    • Get an attribution
    • Get an advertiser and test group Id
    • Provide your own user Id
    • Integrate third-party SDKs
    • Forward in-app purchases
    • Get an affiliate link
    • Configure your iOS application
Powered by GitBook
On this page
  1. Unity

Get an advertiser and test group Id

The justtrack SDK can provide you with the advertiser id (GAID or IDFA) 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 (Android) or IDFV (iOS). 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.

using JustTrack;

JustTrackSDK.GetAdvertiserIdInfo((info) => {
  // info.AdvertiserId will contain the advertiser id (lowercase) or null if it is not available
  // info.IsLimitedAdTracking tells you if the user opted out of ad tracking (the advertiser id might be null in that case depending on the Android version)
}, (error) => {
    // we failed to retrieve the advertiser id - this is a different case than the user limiting ad tracking
});
JustTrackSDK.GetTestGroupId((testGroupId) => {
    // testGroupId is either 1, 2, 3, or null
    // if it is null we could not retrieve an advertiser id or IDFV internally
}, (error) => {
    // we failed to determine the test group id. This will happen if retrieving the advertiser id fails
});

Last updated 1 year ago