Data Privacy
The MobileFuse SDK supports privacy configurations that can be managed using an IAB compatible GPP Consent String, and US Privacy Strings. You can also tell the SDK whether your user is subject to COPPA, due to them being under 13 years of age.
The following snippet demonstrates configuration of a GPP String:
MobileFusePrivacyPreferences *privacyPreferences = [[MobileFusePrivacyPreferences alloc] init];
[privacyPreferences setGppConsentString:@"DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN"];
[MobileFuse setPrivacyPreferences:privacyPreferences];
The following snippet demonstrates configuration for the US privacy and COPPA compliance:
MobileFusePrivacyPreferences *privacyPreferences = [[MobileFusePrivacyPreferences alloc] init];
[privacyPreferences setSubjectToCoppa:NO]; // Shound be YES if user is under 13 years of age
[privacyPreferences setUsPrivacyConsentString:@"<US Privacy String>"]; // e.g. 1YNN
[MobileFuse setPrivacyPreferences:privacyPreferences];
The following snippet demonstrates setting the "do not track" option as an alternative to providing specific privacy strings:
MobileFusePrivacyPreferences *privacyPreferences = [[MobileFusePrivacyPreferences alloc] init];
[privacyPreferences setDoNotTrack:YES]; // With "do not track" set, the user is opted out!
[MobileFuse setPrivacyPreferences:privacyPreferences];
var privacyPreferences = MobileFusePrivacyPreferences()
privacyPreferences.setDoNotTrack(true) // With "do not track" set, the user is opted out!
MobileFuse.setPrivacyPreferences(privacyPreferences)
Note
To ensure that you get reliable ad fill and the best CPMs, please ensure that you implement the data privacy methods that are relevant to your user.
App Tracking Transparency Framework
You must also ensure that you have implemented the Apple App Tracking Transparency Framework into your app before any ad calls. This sample code shows how you can request the authorization. If authorization has already been granted, then the callback will immediately fire with the correct status, therefore it’s advisable to call the requestTrackingAuthorizationWithCompletionHandler method every time your app launches.
#import <AppTrackingTransparency/AppTrackingTransparency.h>
- (void)requestAppTracking {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
switch (status) {
case ATTrackingManagerAuthorizationStatusNotDetermined:
NSLog(@"ATT - Request not determined");
break;
case ATTrackingManagerAuthorizationStatusRestricted:
NSLog(@"ATT - Request restricted");
break;
case ATTrackingManagerAuthorizationStatusDenied:
NSLog(@"ATT - Request denied");
break;
case ATTrackingManagerAuthorizationStatusAuthorized:
NSLog(@"ATT - Request authorized");
break;
}
// Now we can request an ad!
dispatch_async(dispatch_get_main_queue(), ^{
[self loadAnAd];
});
}];
}
In addition to the above, you must include an NSUserTrackingUsageDescription key in your Info.plist to define the message shown to the user when the App Tracking Transparency dialog shows. If you do not include this key, an exception will be raised when you attempt to request tracking authorization using the above methods.
Privacy Manifest
The MobileFuse SDK includes a PrivacyInfo.xcprivacy Privacy Manifest file describing the types of data collected by the MobileFuse SDK and reasons for collection as described in Apple's documentation.
Location Privacy
Your app data privacy consent dialog should allow users to opt-in to location tracking. By default, the SDK and adapters will assume that your app is running in a context which requires an opt-out for data usage for ad personalization.
When a user opts out of personalized ad tracking, the SDK will by default not collect or transmit any PII, and the MobileFuse server will automatically scrub any potentially personal information from the bidstream when any opt-out flags are set (OS level flags, US Privacy, GPP).
If you want to specifically disable location targeting within the iOS SDK then you can call the opt out method as follows:
[MobileFuseTargetingData setAllowLocation:NO];
MobileFuseTargetingData.setAllowLocation(false)
Opt-in configuration
If you are required to display a consent dialog to your users before location information is used for ad personalization, then you can set the MobileFuse SDK or adapter into an opt-in mode.
To do this, set the following flag in your Info.plist:
<key>MFDisableUserLocation</key>
<true>
Once the SDK has been configured in this mode, you can then pass the user location preferences to the MobileFuse SDK using the following calls:
// User has opted in to location-based ad personalization:
[MobileFuseTargetingData setAllowLocation:YES];
// User has opted out of location-based ad personalization:
[MobileFuseTargetingData setAllowLocation:NO];
// User has opted in to location-based ad personalization:
MobileFuseTargetingData.setAllowLocation(true);
// User has opted out of location-based ad personalization:
MobileFuseTargetingData.setAllowLocation(false);
Updated 7 months ago