Digital Measurement Browser Testing Environment and Template:iOS Privacy and Opt-Out: Difference between pages

From Engineering Client Portal

(Difference between pages)
(Created page with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR & DTVR}} {{CurrentBreadcrumb}} Category:Digital ==Overview== The purpose of the client testing environment is to...")
 
 
Line 1: Line 1:
{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR & DTVR}}  {{CurrentBreadcrumb}}
== Privacy and Opt-Out ==
[[Category:Digital]]
There are three primary methods for implementing user Opt-out preferences:
# '''[[#OS-level_Opt-out|OS-level Opt-out]]''' - managed by ''Limit Ad Tracking'' setting on device ('''preferred approach''').
# '''[[#Legacy_Opt-out|Legacy Opt-out]]''' - Direct call to SDK; used only for older versions of Nielsen iOS SDK (< 5.1.1.18)


==Overview==
=== OS-level Opt-out ===
The purpose of the client testing environment is to provide clients with the ability to preview and test pre-release builds of the Nielsen SDK (BSDK) using the standard BSDK code. Only builds that have been approved by our QA team will be made available to the 'FutureMaster Environment'.
''OS-level Opt-out'' method available on Nielsen iOS '''SDK Versions 5.1.1.18 and above'''.


===Enabling an APPID for FutureMaster===
The Nielsen SDK automatically leverages the iOS's ''Limit Ad Tracking'' 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.
If you are interested in this pre-release testing feature, please reach out to your Technical Account Manager or Client Services Associate.  This feature must be enabled at the APPID level before it can be used.


===Testing Parameters===
=== Legacy Opt-out ===
Once your APPID has been enabled for pre-release testing, you will be able to utilize an additional value pair labled: <code>enableTesting</code>
The ''Legacy opt-out'' method is only necessary for Nielsen iOS '''SDK versions less than 5.1.1.18'''.


There will now be four parameters available during the SDK Initialization call:
Nielsen iOS SDK 5.1.1.17 and above will check for ''OS-level opt-out'' first, if available. The user will be opted out if indicated at the OS-level '''OR''' the App-level.


{| class="wikitable"
==== The legacy opt-out method works as follows: ====
|-
* Get the legacy Nielsen opt-out URL via [[optOutURL]]
! Parameter !! Description !! Values
* 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
| apid || Unique ID assigned to player/site. || <code>PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX</code>
** Opt-out if the WebView URL = <code>nielsenappsdk://1</code>
|-
** Opt-in if the WebView URL = <code>nielsenappsdk://0</code>
| instanceName || Name of SDK instance || Any string value
* Pass the detected URL to the [[userOptOut]] function
|-
** Example: <syntaxhighlight lang=swift>NielsenAppApi?.userOptOut("nielsenappsdk://1"); // User opt-out</syntaxhighlight>
| nol_sdkDebug: "debug" || Enables Nielsen console logging. Only required for testing || <code>{nol_sdkDebug: "debug"}</code>
|-
|enableTesting || Enables FutureMaster Access || <code>enableTesting: 'true'</code><br><code>enableTesting: 'false'</code>
|}


<syntaxhighlight lang="javascript">
==== Legacy Opt-out example code ====
// Sample SDK Initialization
{{ExampleCode|
var nSdkInstance = NOLBUNDLE.nlsQ('EXAMPLE-USER-ID-HERE-123456789', 'nlsnInstance', {
|Objective C = <syntaxhighlight lang="objective-c">
     nol_sdkDebug: "debug",
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
    enableTesting: 'true'
 
});
    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);
     }       
}
</syntaxhighlight>
|Swift = <syntaxhighlight lang="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)
        }
    }
</syntaxhighlight>
</syntaxhighlight>
}}


==SDK Location==
=== Retrieve current Opt-Out preference ===
If during initialization <code>nol_testingEnabled: 'true'</code>, and the APPID has been enabled for FutureMaster testing, then the Browser SDK will be download from the FutureMaster server, and all data will be sent to the certification servers.
Whether the user is opted out via OS-level Opt-out or via App-level Opt-out, the current Opt-Out status as detected by the SDK is available via the [[optOutStatus]] property in the Nielsen SDK API


Example:
=== Required Privacy Links ===
* Production SDK location: http://cdn-gl.imrworldwide.com/novms/js/2/nlsSDK600.bundle.min.js<br>
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.
* Testing SDK location: http://futuremaster.nonprod.digitalengsdk.com/novms/js/2/nlsSDK600.bundle.min.js<br>
* Testing sfcode: <code>cert</code>


==Example in Action==
In addition, the following text must be included in your app store description.
Below are two pages showing the above in action.<br>
<blockquote>
http://nielsenonlinesupport.com/colin/sdk3/testingOverride.htm<br>
'''"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/digitalprivacy for more information"'''</blockquote>
http://nielsenonlinesupport.com/colin/sdk3/testingOverride-off.htm

Revision as of 20:45, 4 December 2019

Privacy and Opt-Out

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

  1. OS-level Opt-out - managed by Limit Ad Tracking setting on device (preferred approach).
  2. Legacy Opt-out - Direct call to SDK; used only for older versions of Nielsen iOS SDK (< 5.1.1.18)

OS-level Opt-out

OS-level Opt-out method available on Nielsen iOS SDK Versions 5.1.1.18 and above.

The Nielsen SDK automatically leverages the iOS's Limit Ad Tracking 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.

Legacy Opt-out

The Legacy opt-out method is only necessary for Nielsen iOS SDK versions less than 5.1.1.18.

Nielsen iOS SDK 5.1.1.17 and above will check for OS-level opt-out first, if available. The user will be opted out if indicated at the OS-level OR the App-level.

The legacy opt-out method works as follows:

  • Get the legacy 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 App-level 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/digitalprivacy for more information"