Template

iOS Privacy and Opt-Out: Difference between revisions

From Engineering Client Portal

Line 8: Line 8:


The Nielsen SDK automatically leverages the iOS's ''Limit Ad Tracking' or AppTracking' setting.  
The Nielsen SDK automatically leverages the iOS's ''Limit Ad Tracking' or AppTracking' setting.  
*  If the User's device is running < iOS 13.x, the Nielsen SDK will check the status of ''Limit Ad Tracking'' (Located under Privacy >> Advertising). If this is enabled, the user will be opted out of demographic measurement.
*  If the User's device is running < iOS 13.x, the Nielsen SDK will check the status of '''Limit Ad Tracking''' (Located under Privacy >> Advertising). If this is enabled, the user will be opted out of demographic measurement.
*  iOS14 modifies the way apple manages the collection of a device's IDFA (ID for Advertisers).  Starting with Version 8.x of the Nielsen App SDK, the AppTracking values are checked during initialization.  If the AppTracking value returned is equal to The updated build of the Nielsen SDK V8.x+ If the User's device is running > iOS14.x, the Nielsen SDK will check the status of ''AppTracking'' (Located under Privacy >> Advertising).
*  iOS14 modifies the way apple manages the collection of a device's IDFA (ID for Advertisers).  Starting with Version 8.x of the Nielsen App SDK, the AppTracking values are checked during initialization.  If the AppTracking value returned is equal to The updated build of the Nielsen SDK V8.x+ If the User's device is running > iOS14.x, the Nielsen SDK will check the status of ''AppTracking'' (Located under Privacy >> Advertising).
** AppTracking is managed using the [https://developer.apple.com/documentation/apptrackingtransparency AppTrackingTransparency framework].  If the value returned when checked is:
** '''AppTracking''' is managed using the [https://developer.apple.com/documentation/apptrackingtransparency AppTrackingTransparency framework].  If the value returned when checked is:
*** ATTrackingManager.AuthorizationStatus.authorized or ATTrackingManager.AuthorizationStatus.notDeterminded then the user will be included in demographic measurement.
*** <code>ATTrackingManager.AuthorizationStatus.authorized </code> or ATTrackingManager.AuthorizationStatus.notDeterminded then the user will be included in demographic measurement.
*** ATTrackingManager.AuthorizationStatus.denied or ATTrackingManager.AuthorizationStatus.restricted, then the user will not be included in demographic measurement.
*** ATTrackingManager.AuthorizationStatus.denied or ATTrackingManager.AuthorizationStatus.restricted, then the user will not be included in demographic measurement.
The user is opted out of demographic measurement if the OS-level ''"Limit Ad Tracking"'' setting is ''enabled''. As a publisher, you cannot override this setting.
The user is opted out of demographic measurement if the OS-level ''"Limit Ad Tracking"'' setting is ''enabled''. As a publisher, you cannot override this setting.

Revision as of 16:33, 2 October 2020

Privacy and Opt-Out

There are two primary methods for implementing user Opt-out preferences:

  1. OS-level Opt-out - managed by AppTracking' or 'Limit Ad Tracking setting on device (preferred approach).
  2. User Choice - Direct call to SDK. Can be used without the Ad Framework

OS-level Opt-out

OS-level Opt-out method available on Nielsen iOS

The Nielsen SDK automatically leverages the iOS's Limit Ad Tracking' or AppTracking' setting.

  • If the User's device is running < iOS 13.x, the Nielsen SDK will check the status of Limit Ad Tracking (Located under Privacy >> Advertising). If this is enabled, the user will be opted out of demographic measurement.
  • iOS14 modifies the way apple manages the collection of a device's IDFA (ID for Advertisers). Starting with Version 8.x of the Nielsen App SDK, the AppTracking values are checked during initialization. If the AppTracking value returned is equal to The updated build of the Nielsen SDK V8.x+ If the User's device is running > iOS14.x, the Nielsen SDK will check the status of AppTracking (Located under Privacy >> Advertising).
    • AppTracking is managed using the AppTrackingTransparency framework. If the value returned when checked is:
      • ATTrackingManager.AuthorizationStatus.authorized or ATTrackingManager.AuthorizationStatus.notDeterminded then the user will be included in demographic measurement.
      • ATTrackingManager.AuthorizationStatus.denied or ATTrackingManager.AuthorizationStatus.restricted, then the user will not be included in demographic measurement.

The user is opted out of demographic measurement if the OS-level "Limit Ad Tracking" setting is enabled. As a publisher, you cannot override this setting.

User Choice

The User Choice method can be used without the Ad Framework, or in situations where the publisher does not wish to use the App Tracking Transparency Framework.

The User Choice opt-out method works as follows:

  • Get the Nielsen opt-out URL via optOutURL
  • Display a WebView element whose loadUrl is set to the value obtained from optOutURL
  • Detect if the WebView URL changes to a special URL that indicates Opt-in, or Opt-out and close the WebView
    • Opt-out if the WebView URL = nielsenappsdk://1
    • Opt-in if the WebView URL = nielsenappsdk://0
  • Pass the detected URL to the userOptOut function
    • Example:
      NielsenAppApi?.userOptOut("nielsenappsdk://1"); // User opt-out
      

Legacy Opt-out example code

Swift

var webView: WKWebView!
var NIELSEN_URL_OPT_OUT : String = "nielsenappsdk://1"
var NIELSEN_URL_OPT_IN : String = "nielsenappsdk://0"

func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {

       let urlStr = navigationAction.request.url?.absoluteString

        if(urlStr == NIELSEN_URL_OPT_OUT || urlStr == NIELSEN_URL_OPT_IN){
            let appApi = self.nielsenApi
            appApi?.userOptOut(urlStr)
            decisionHandler(.allow)

        }else{
           decisionHandler(.cancel)
        }
    }

Objective C

- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {

    NSURLRequest *request = [navigationAction request];
    NSString *url = [[request URL]absoluteString];
    
    if([url isEqualToString:self.NIELSEN_URL_OPT_OUT] || [url isEqualToString:self.NIELSEN_URL_OPT_IN]){
        [self.nielsenApi userOptOut:url];
        decisionHandler(WKNavigationActionPolicyAllow);
    }else{
        decisionHandler(WKNavigationActionPolicyCancel);
    }        
}


Retrieve current Opt-Out preference

Whether the user is opted out via OS-level Opt-out or via User Choice Opt-out, the current Opt-Out status as detected by the SDK is available via the optOutStatus property in the Nielsen SDK API

Required Privacy Links

Users must either have access to the "About Nielsen Measurement" page, or have similar text available within the native app. Include "About Nielsen Measurement" and "Your Choices" link in the Privacy Policy / EULA or as a button near the link to the app's Privacy Policy.

In addition, the following text must be included in your app store description.

"Please note: This app features Nielsen’s proprietary measurement software which contributes to market research, like Nielsen’s TV Ratings. Please see https://www.nielsen.com/us/en/legal/privacy-statement/digital-measurement/ for more information"