Transparency features
Once you integrate the Adtrace SDK into your project, you can take advantage of the following features.
AppTrackingTransparency framework
For each package sent, the Adtrace backend receives one of the following four (4) states of consent for access to app-related data that can be used for tracking the user or the device:
- Authorized
- Denied
- Not Determined
- Restricted
After a device receives an authorization request to approve access to app-related data, which is used for user device tracking, the returned status will either be Authorized or Denied.
Before a device receives an authorization request for access to app-related data, which is used for tracking the user or device, the returned status will be Not Determined.
If authorization to use app tracking data is restricted, the returned status will be Restricted.
The SDK has a built-in mechanism to receive an updated status after a user responds to the pop-up dialog, in case you don't want to customize your displayed dialog pop-up. To conveniently and efficiently communicate the new state of consent to the backend, Adtrace SDK offers a wrapper around the app tracking authorization method described in the following chapter, App-tracking authorization wrapper.
App-tracking authorisation wrapper
Adtrace SDK offers the possibility to use it for requesting user authorization in accessing their app-related data.
Adtrace SDK has a wrapper built on top of the requestTrackingAuthorizationWithCompletionHandler method, where you can as well define the callback method to get information about a user's choice.
Also, with the use of this wrapper, as soon as a user responds to the pop-up dialog, it's then communicated back using your callback method. The SDK will also inform the backend of the user's choice. The NSUInteger value will be delivered via your callback method with the following meaning:
- 0:
ATTrackingManagerAuthorizationStatusNotDetermined - 1:
ATTrackingManagerAuthorizationStatusRestricted - 2:
ATTrackingManagerAuthorizationStatusDenied - 3:
ATTrackingManagerAuthorizationStatusAuthorized
To use this wrapper, you can call it as such:
[Adtrace requestTrackingAuthorizationWithCompletionHandler:^(NSUInteger status) {
switch (status) {
case 0:
// ATTrackingManagerAuthorizationStatusNotDetermined case
break;
case 1:
// ATTrackingManagerAuthorizationStatusRestricted case
break;
case 2:
// ATTrackingManagerAuthorizationStatusDenied case
break;
case 3:
// ATTrackingManagerAuthorizationStatusAuthorized case
break;
}
}];
Get current authorisation status
To get the current app tracking authorization status you can call [Adtrace appTrackingAuthorizationStatus] that will return one of the following possibilities:
0: The user hasn't been asked yet1: The user device is restricted2: The user denied access to IDFA3: The user authorized access to IDFA-1: The status is not available
SKAdNetwork framework
If you have implemented the Adtrace iOS SDK v2.0.5 or above and your app is running on iOS 14, the communication with SKAdNetwork will be set on by default, although you can choose to turn it off. When set on, Adtrace automatically registers for SKAdNetwork attribution when the SDK is initialized. If events are set up in the Adtrace panel to receive conversion values, the Adtrace backend sends the conversion value data to the SDK. The SDK then sets the conversion value. After Adtrace receives the SKAdNetwork callback data, it is then displayed in the panel.
In case you don't want the Adtrace SDK to automatically communicate with SKAdNetwork, you can disable that by calling the following method on configuration object:
[adtraceConfig deactivateSKAdNetworkHandling];
Update SKAdNetwork conversion value
As of iOS SDK v2.0.5 you can use Adtrace SDK wrapper method updateConversionValue: to update SKAdNetwork conversion value for your user:
[Adtrace updateConversionValue:6];
Conversion value updated callback
You can register callback to get notified each time when Adtrace SDK updates conversion value for the user.
You need to implement AdtraceDelegate protocol, implement optional adtraceConversionValueUpdated: method:
- (void)adtraceConversionValueUpdated:(NSNumber *)conversionValue {
NSLog(@"Conversion value updated callback called!");
NSLog(@"Conversion value: %@", conversionValue);
}