User Privacy API

ironSource App Analytics provides analysis of the application data via the users’ privacy settings, to allow better users behavioral analysis based on their chosen data sharing settings.

This can be done via the user privacy API

Use the following API, prior to SDK initialization, to set the user privacy & data sharing information

// The user privacy API
+(void)setUserPrivacy:(ISAnalyticsPrivacyRestriction) toUpdate isRestricted:(BOOL) isRestricted withReason:(ISAnalyticsReason) why
// The user privacy API
static func setUserPrivacy(privacyRestriction: ISAnalyticsPrivacyRestriction, isRestricted: Bool, reason: ISAnalyticsReason)

Parameters

  • ISAnalyticsPrivacyRestriction toUpdate– enumeration of the privacy items. Available values:
    • AGE_RESTRICTION – Stating whether the user has an age restriction
    • RESTRICTED_DATA – Stating the user enabled / disabled user tracking
  • BOOL restricted – boolean. yes or no to restrict the PrivacyRestriction
  •  ISAnalyticsReason why –  an enumerated value of the reason for the restriction or privacy (CCPA, COPPA, GDPR, USER_RESTRICT, OS_RESTRICT, PARENT_CONTROL)

Note: All parameters are mandatory 

Example of user privacy API

// Example of user privacy API
[IronSourceAnalytics setUserPrivacy:ISAnalyticsPrivacyRestrictionRESTRICTED_DATA isRestricted:true withReason:ISAnalyticsReasonCOPPA];
// Example of user privacy API
IronSourceAnalytics.setUserPrivacy(ISAnalyticsPrivacyRestriction.RESTRICTED_DATA, isRestricted: true, with: ISAnalyticsReason.COPPA)