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

// User privacy settings API
IronSourceAnalytics.setUserPrivacy(ISAnalyticsPrivacyRestriction toUpdate, bool restricted, ISAnalyticsReason why);

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 – True if the user ask 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 using the user privacy settings API, prior to sdk initialization
IronSourceAnalytics.setUserPrivacy(ISAnalyticsPrivacyRestriction.RESTRICTED_DATA, true, ISAnalyticsReason.COPPA);