admob.updateConsentForm()

Type Function
Return value none
Revision Release 2024.3703
Keywords ads, advertising, AdMob, hide
See also admob.loadConsentForm()
admob.*

Overview

This function updates Consent Manager with information that helps determine if a message needs to be displayed.

Syntax

admob.updateConsentForm( [options] )
options (optional)

Table. Table containing additional parameters for the specified ad type — see the next section for details.

Parameter Reference

The options table includes parameters

underage (optional)

boolean, set tag for under the age of consent. True means users are underage.

debug (optional)

Table, accepts geography and testDeviceIdentifiers fields. The geography valid types are "EEA", "notEEA", "disabled". The testDeviceIdentifiers takes an Array of Strings of the Test Devices Hash Id.

Example

local admob = require( "plugin.admob" )

local function adListener( event )

end
-- Initialize the AdMob plugin
admob.init( adListener, { appId="YOUR_ADMOB_APP_ID" } )

admob.updateConsentForm({ underage=true, debug={ geography = "EEA", testDeviceIdentifiers={"Your-Device-Hash"} } })