Ad Request Global Parameters
An object for storing global parameters that will be applied when creating an AdRequest.
Some parameters of AdRequest are designed to be passed in all requests, not just individual ones. To avoid duplicating code when creating AdRequest you can pass all parameters via AdServiceProvider.configure using the adRequestGlobalParameters parameter, and change them later using AdService.setAdRequestGlobalParameters and AdService.removeAdRequestGlobalParameter.
Note: This object describes global parameters specific only for AdRequest. However, you can also set GlobalParameters that will apply to all requests, including AdRequest via AdServiceProvider.configure using the
globalParametersparameter, and change them later using AdService.setGlobalParameters and AdService.removeGlobalParameter.
// Set parameter
val result = adServiceProvider.configure(
networkId = NETWORK_ID,
parentCoroutineScope = coroutineScope,
globalParameters = GlobalParameters(accessMode = AccessMode.OPT_OUT),
adRequestGlobalParameters = AdRequestGlobalParameters(isIpIdentified = false)
)
// Change parameter over time
adService.setAdRequestGlobalParameters(
AdRequestGlobalParameter(
AdRequestGlobalParameters::cookiesAccess,
AdRequestGlobalParameters.CookiesAccess.NO_COOKIES
),
AdRequestGlobalParameter(
AdRequestGlobalParameters::isSHBEnabled,
true
)
)
// Clear parameter
adService.removeAdRequestGlobalParameter(AdRequestGlobalParameters::cookiesAccess)See also
Constructors
Types
Enum containing all possible configurations of the server's work with cookies.
Digital Service Act (“DSA”) is a EU regulation which aims among other things to increase transparency on online platforms for users in relation to recommended content – including advertising.
Properties
A parameter that indicates how the ad server will work with cookies.
Digital Service Act (“DSA”) is a EU regulation which aims among other things to increase transparency on online platforms for users in relation to recommended content – including advertising.
Determines whether the IP address is anonymised.
Defines, if the request should also consider the server side header bidding.