Consent Management Provider
The first step to apply GDPR is to collect the user's consent about the use of his personal data.
This can be done through various tools such as Consent Management Provider (CMP). A CMP is a technology interface (usually an SDK for Apps environment) permitting apps developers to provide transparency and obtain consent where necessary for themselves and/or on behalf of their chosen third parties and to transmit informations about which vendors and which purposes a user has consented to with vendors.
IAB provides an open-source CMP, based on IAB's Transparency and Consent Framework 1.1. We recommend you to integrate this library into your apps. Of course you can also integrate another CMP of your choice as long as it is compliant with IAB's framework and specifications since Smart Instream SDK will retrieve consent based on these specifications.
Passing user's consent to Smart Instream SDK
The GDPR consent string have to be stored in the
SharedPreferences on Android and in the
NSUserDefaults on iOS, both by using
IABConsent_ConsentString. Our SDK will get the consent string directly from the
the official IAB key.
By using a CMP (compliant with the IAB specifications) you will have nothing to do. On the other hand, if you are using any other CMP that do not respect the IAB
specifications, you will have to set the consent string in the
By using the code below, you will set the consent string manually:
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); SharedPreferences.Editor editor = prefs.edit(); editor.putString("IABConsent_ConsentString", "yourCMPComputedConsentStringBase64format"); editor.apply();
NSString *myConsentString = @"yourCMPComputedConsentStringBase64format"; [[NSUserDefaults standardUserDefaults] setObject:myConsentString forKey:@"IABConsent_ConsentString"]; [[NSUserDefaults standardUserDefaults] synchronize];
Some third party mediation SDKs are not IAB compliant and do not rely on the consent string. Those SDK use, most of the time, a binary consent for the advertising purpose.
If you are using one or more of those SDK through Smart mediation, you can set this binary consent for all adapters at once by settings the String
"1" (if the consent
is granted), or
"0" (if the consent is denied) in the
NSUserDefaults for the key
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); SharedPreferences.Editor editor = prefs.edit(); editor.putString("Smart_advertisingConsentStatus", "1" or "0"); editor.apply();
NSString *advertisingBinaryConsentString = @"1" or @"0"; [[NSUserDefaults standardUserDefaults] setObject:myConsentString forKey:@"Smart_advertisingConsentStatus"]; [[NSUserDefaults standardUserDefaults] synchronize];