Documentation

Support

Key changes in the new Unity Ads privacy API

This guide explains how LevelPlay mediation users and direct Unity Ads integrations can upgrade to the new beta privacy APIs, outlining the API changes and which new beta APIs to use.
Read time 2 minutesLast updated 5 hours ago

Unity Ads SDK 4.17.0 introduces new public privacy APIs in beta, currently used only through the LevelPlay mediation adapter. This guide is for developers integrating Unity Ads SDK 4.17.0 directly with the LevelPlay mediation adapter.

Upgrade to Unity Ads SDK 4.17.0

If you’re a LevelPlay mediation user using the LevelPlay mediation adapter, all privacy and consent handling is managed directly through the adapter. The recommended best practice is to review and follow the LevelPlay privacy regulation advanced settings documentation for your platform (Android, iOS, Unity, Adobe Air, Flutter, or React Native).If your integration correctly sets consent flags in the appropriate scenarios, no further action from you is needed.

What’s changing

Review the following table to determine which Metadata privacy API methods you must update to use the new beta privacy API.

Former privacy API

New privacy API to use instead

Description

gdpr.consent
setUserConsent
Covers consent for opt-in frameworks.
privacy.consent
setUserOptOut
Covers consent for opt-out frameworks.
user.nonbehavioral
setNonBehavioral
Covers consent for age-restricted frameworks.
pipl.consent
Not applicable.Deprecated API, should be removed.
privacy.useroveragelimit
Not applicable.Deprecated API, should be removed.
Refer to Use the new beta privacy APIs on guidance for implementation.