Type Function Return value none Revision Release 2024.3703 Keywords ads, advertising, AppLovin, setHasUserConsent, Applovin Max See also applovinMax.init() applovinMax.load() applovinMax.isLoaded() applovinMax.setIsAgeRestrictedUser() [applovinMax.*][applovinMax.applovin]
AppLovin SDK requires that publishers set a flag indicating whether the user has provided the publisher opt-in consent for the collection and use of personal data.
applovinMax.setHasUserConsent( hasUserConsent )
Boolean. If the user has consented, please set the following flag to true
, otherwise set it to false
. The default value is false
.
local applovinMax = require( "plugin.applovinMax" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization applovinMax.setHasUserConsent( true ) end end -- Initialize the AppLovin plugin applovinMax.init( adListener )