文档

支持

LevelPlay SDK - React Native

Regulation advanced settings for React Native

Implement advanced regulation settings for GDPR and US privacy compliance, including user consent and data sharing preferences.
阅读时间1 分钟最后更新于 5 天前

LevelPlay's mediation platform can pass a user's consent choice to supported ad networks. Starting from LevelPlay SDK version 7.7.0, General Data Protection Regulation (GDPR) consent collected from the following entities is automatically shared with the LevelPlay SDK to ensure GDPR compliance:
  • Google's CMP solution (Google UMP)
  • Any compatible CMP that supports Google Additional Consent

Prerequisites

Before updating and passing a user’s consent status to the LevelPlay SDK, ensure the following:
  • Install and use LevelPlay SDK version 9.4.0 or higher.
  • Set the consent individually for each network by submitting a map of network keys to boolean values that indicate whether a user has granted each network permission to collect and share data.
The API you use depends on your LevelPlay SDK version.

LevelPlay SDK version 9.4.0 and higher

Use the following API for LevelPlay SDK versions 9.4.0 and higher, where consent is set individually for each network using your map of network keys to boolean values:
val consents = mapOf( "UnityAds" to true, "AdMob" to false, "AppLovin" to true)LevelPlayPrivacySettings.setGDPRConsents(consents)
重要
Each call to this method completely replaces all previously stored GDPR consents. Only networks included in the provided map will have consent entries after the call, and you should omit a network from the map to remove its stored consent.

LevelPlay SDK version 9.3.0 and lower

Use the following API for the LevelPlay SDK version 9.3 and lower.
注意
This API is deprecated and will be removed in a future SDK version.
If the user consents, set the following flag to true:
LevelPlay.setConsent(true);
If the user doesn't consent, set the following flag to false:
LevelPlay.setConsent(false);

Manage US consumer privacy act compliance in LevelPlay

LevelPlay's mediation platform supports publishers in restricting the sale or sharing of end users’ personal information under U.S. state privacy laws, such as the California Consumer Privacy Act (CCPA). The notification about personal information of specific users applies to users in the following states:
  • California Consumer Privacy Act (CCPA), which is effective in California starting January 2019.
  • Brazilian General Data Protection Law (LGPD), which is effective starting August 2021.
  • Virginia Consumer Data Privacy Act (VCDPA), which is effective in Virginia starting January 2023.
  • Colorado Privacy Act (CPA), which is effective in Colorado starting July 2023.
  • Connecticut Data Privacy Act (CTDPA), which is effective in Connecticut starting July 2023.
  • Quebec Law 25 (QCLAW25), which is effective in Quebec, Canada starting September 2023.
  • Utah Consumer Privacy Act (UCPA), which is effective in Utah starting December 2023.
  • Florida Digital Bill of Rights (FDBR), which is effective in Florida starting July 2024.
  • Oregon Consumer Privacy Act (OCPA), which is effective in Oregon starting July 2024.
  • Texas Data Privacy and Security Act (TDPSA), which is effective in Texas starting July 2024.
  • Montana Consumer Data Privacy Act (MCDPA), which is effective in Montana starting October 2024.
  • Iowa Consumer Data Protection Act (ICDPA), which is effective in Iowa starting January 1, 2025.
  • Nebraska Data Privacy Act (NDPA), which is effective in Nebraska starting January 1, 2025.
  • New Hampshire Data Privacy Act (NHDPA), which is effective in New Hampshire starting January 1, 2025.
  • Delaware Personal Data Privacy Act (DPDPA), which is effective in Delaware starting January 1, 2025.
  • New Jersey Data Privacy Act (NJDPA), which is effective in New Jersey starting January 16, 2025.
  • Tennessee Information Protection Act (TIPA), which is effective in Tennessee starting July 1, 2025.
  • Minnesota Consumer Data Privacy Act (MNCDPA), which is effective in Minnesota starting July 31, 2025.
  • Maryland Online Data Privacy Act (MODPA), which is effective in Maryland starting October 1, 2025.
  • Rhode Island Data Transparency and Privacy Protection Act (RIDTPPA), which is effective in Rhode Island starting January 1, 2026.
  • Kentucky Consumer Data Protection Act (KCDPA), which is effective in Kentucky starting January 1, 2026.
  • Indiana Consumer Data Protection Act (ICDPA), which is effective in Indiana starting January 1, 2026.
Visit our legal site for more information on Unity's approach to privacy. Use the
do not sell
setting to notify the LevelPlay SDK about the personal information of users in these states, using a
true
or
false
value. Starting from LevelPlay SDK version 6.14.0 and higher, the recommended best practice is to set the API before initializing the SDK to ensure compliance with privacy frameworks.

Prerequisites

Before updating and passing a user’s consent status to the LevelPlay SDK, ensure you’ve installed and are using Level Play SDK version 9.4.0 or higher. The API you use depends on your LevelPlay SDK version.

LevelPlay SDK version 9.4.0 and higher

Use the following API if the user has opted out of the sale or sharing of their personal information:
LevelPlayPrivacySettings.setCCPA(true)

LevelPlay SDK version 9.3.0 and lower

Use the following API for the LevelPlay SDK version 9.3 and lower.
注意
This API is deprecated and will be removed in a future SDK version.
If the user has opted out of the sale or sharing of their personal information:
LevelPlay.setMetaData("do_not_sell","true");
If the user consents to the sale of their personal information:
LevelPlay.setMetaData("do_not_sell","false");

Manage user-level settings for child-directed apps with age gates

LevelPlay's mediation platform enables publishers of child-directed apps to flag specific end-users as children, as permitted or required by applicable law, for example, the Children's Online Privacy Protection Act (COPPA). Publishers of child-directed apps are responsible for determining whether their app must treat all end-users as children, or whether flagging at the end-user level is permitted. The recommended best practice is to consult your legal counsel on your obligations before implementing user-level settings for child-directed apps. Use the
is_child_directed
flag to indicate whether a specific end-user is a child. Starting from LevelPlay SDK version 7.1.0 and higher, the recommended best practice is to set the API before initializing the SDK to ensure compliance with privacy frameworks.

Prerequisites

Before updating and passing a user’s consent status to the LevelPlay SDK, ensure you’ve installed and are using Level Play SDK version 9.4.0 or higher.

Flag an end-user as child-directed

The API you use depends on your LevelPlay SDK version.

LevelPlay SDK version 9.4.0 and higher

Use the following API to flag an end-user as child-directed across all supported networks.
LevelPlayPrivacySettings.setCOPPA(true)

LevelPlay SDK version 9.3.0 and lower

Use the following API for legacy LevelPlay SDK version 9.3.0 and lower. If the end-user is a child as defined by applicable regulations, call the following API per network. For a full list of network keys and associated values, refer to Unity LevelPlay - Child and child-directed apps.
注意
This API is deprecated and will be removed in a future SDK version.
For example, for the ironSource Ads network, if the end-user is a child, use the following API:
LevelPlay.setMetaData("is_child_directed","true");
If the end-user isn’t a child, use the following API:
LevelPlay.setMetaData("is_child_directed","false");

Google Play Families policy

Follow these steps if any of your apps participate in Google Play's Designed for Families program, are listed in Google Play's Family section, or include children as one of the target audiences. In addition, make sure you flag your apps for COPPA compliance on the LevelPlay platform.

Guidance for apps directed at children

If your apps are primarily directed at children, follow these steps:
  1. Update your apps' manifest files to prevent access to the Android Advertising ID (AAID):
    <uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>
  2. Use the LevelPlay Metadata API to prevent access to the AAID for end-users flagged as children. Make sure you do this before initializing the LevelPlay SDK.
    LevelPlay.setMetaData('is_deviceid_optout', ['true']);LevelPlay.setMetaData('is_child_directed', ['true']);LevelPlay.setMetaData('Google_Family_Self_Certified_SDKS', ['true']);
  3. Update apps' Gradle:
    implementation 'com.google.android.gms:play-services-appset:16.0.0'

Guidance for apps directed at a mixed audience

If your apps are directed at a mixed audience, follow these steps:
  1. Update your apps' manifest files to allow access to the Android Advertising ID (AAID):
    <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
  2. Use the LevelPlay Metadata API to prevent access to the AAID only for children or users of unknown age, and flag those users as children. Make sure you do this before initializing the LevelPlay SDK.
    LevelPlay.setMetaData('is_deviceid_optout', ['true']);LevelPlay.setMetaData('is_child_directed', ['true']);
  3. Update apps' Gradle:
    implementation 'com.google.android.gms:play-services-appset:16.0.0'implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
注意
Preventing access to the GAID (Android Advertising ID) might impact your monetization performance. Ensure that these integration changes are only made for required apps and users.