---
title: "CCPA Integration for AdManager SDK"
canonical: "https://hub.freewheel.tv/space/RCS/169607192/CCPA%20Integration%20for%20AdManager%20SDK"
format: markdown
---
Overview AdManager can automatically retrieve consent data using IAB's  California Consumer Privacy Act (CCPA)  compliance framework and send it as key values in ad requests. In cases where the consent configuration is also set through setting key values, values of keys "_fw_us_privacy" will be replaced by automatically retrieved CCPA consent values. Platform Beginning supported version HTML5 6.33.0 Android 6.33.0 iOS 6.33.0 HTML5 AdManager As of December 17, 2019 (6.33 Release), HTML5 AdManager can automatically retrieve consent data using the USP API in the publisher's page. The parameter "tv.freewheel.SDK.PARAMETER_USE_CCPA_USPAPI" is enabled by default, which retrieves the consent data in the publisher's page and adds these values to the ad request. Since this functionality assumes the consent has already been obtained from the UI or existing cookies,  retrieval of consent data times out after 500 milliseconds . New Constant: tv.freewheel.SDK.PARAMETER_USE_CCPA_USPAPI For more information about the 6.33 Release, see the  AdManager SDK Release Notes . Manually setting consent data for SDK versions older than 6.33: tv.freewheel.SDK.Context.addKeyValue("_fw_us_privacy",<consent_string>); Android AdManager As of December 17, 2019 (6.33 Release), Android AdManager can automatically retrieve IABUSPrivacy_String from Android's PreferenceManager's DefaultSharedPreferences. For more information about the 6.33 Release, see the  AdManager SDK Release Notes . Manually setting consent data for SDK versions older than 6.33: To manually add key values see the API documentation bundled with your AdManager version release for more details about Configuration classes and the API to use them. adRequestConfiguration.addKeyValueConfiguration(new KeyValueConfiguration("_fw_us_privacy",<consent_string>)) iOS AdManager As of December 17, 2019 (6.33 Release), iOS AdManager can automatically retrieve consent data using the USP API in the publisher's app. To support automatic retrieval of CCPA consent information using IAB's CCPA Compliance Framework, we modified our FWConsentConfiguration class to obtain the IABUSPrivacy_String from  NSUserDefaults standardUserDefaults . For AdManager to automatically retrieve the US privacy string, the US Privacy String should be set in  NSUserDefaults standardUserDefaults  before initializing FWRequestConfiguration. If the value needs to be set after initializing FWRequestConfiguration, please store the US Privacy String in  NSUserDefaults standardUserDefaults  and then assign FWRequestConfiguration's consentConfiguration to a new FWConsentConfiguration object.  For more information about the 6.33 Release, see the  AdManager SDK Release Notes. Manually setting consent data for SDK versions older than 6.33: To manually add key values see the API documentation bundled with your AdManager version release for more details about Configuration classes and the API to use them. fwRequestConfiguration addValue:<consent_string> forKey:@"_fw_us_privacy" Setting Key Values Prior to the  6.33 Release , consent configuration was set using key values. There are different methods for setting key values depending on which SDK is being used. Please reference our   SDK documentation  for more details. HTML5 SDK   - Use the addKeyValue function of the Context Class tv.freewheel.SDK.Context.addKeyValue = function(_fw_us_privacy,<consent_string>)   Flash SDK  -  Use the setKeyValue function of the IAdManager Class function setKeyValue(key:_fw_us_privacy, value:<consent_string>):void iOS SDK  -  Use the addValue:forKey: function of the FWRequestConfiguration class [fwRequestConfigurationaddValue:<consent_string> forKey:@"_fw_us_privacy"]; Android SDK   - Use the addKeyValueConfiguraiton function of the AdRequestConfiguration class: adRequestConfiguration.addKeyValueConfiguration(new KeyValueConfiguration("_fw_us_privacy", <consent_string>)) LinkTag2 Display Integrations Key Values are defined using the  key_values  parameter when initializing window._fw_linktag_params - see below: window._fw_linktag_params = {         scan_delay: 0,         allow_rescan_after: 15000,         server: "[host] .v.fwmrm.net ",         network_id: "96749",         profile: "g_linktag2_html",         other_global_params: "csid=DemoSiteGroup.01&caid=DemoVideoGroup.01",          key_values: "module=DemoPlayer&feature=trackingURLs&_fw_us_privacy=<consent_string>"     }; More information on LinkTag2 can be found   here . Active Display Tags Adding Key Values to active display tags is described in   Display Ads: Introduction  -  Specifically, they are added to the {TARGET-KEY-VALUES} section in the template below. Note the location of the semi-colons with regard to other sections of this tag template: <script type='text/javascript' src='http://{AD-SERVER-DOMAIN}/ad/g/1?nw={NETWORK-ID}&prof=g_js&ssid={SITE-SECTION-ID}&resp=ad; {TARGET-KEY-VALUES} ;{SLOT-KEY-VALUES};'></script> With the CCPA Key Values populated: <script type='text/javascript' src='http://{AD-SERVER-DOMAIN}/ad/g/1?nw={NETWORK-ID}&prof=g_js&ssid={SITE-SECTION-ID}&resp=ad; _fw_us_privacy=<consent_string> ;{SLOT-KEY-VALUES};'></script> \