AdRequest

constructor(contentUnit: String, profiles: HashMap<String, String> = hashMapOf(), keywords: List<String> = listOf(), window: UInt? = null, timeoutAfterSeconds: UInt? = null, gdprPd: Boolean? = null, campaignId: String? = null, bannerId: String? = null, isSHBEnabled: Boolean? = null, dsa: AdRequestGlobalParameters.DSA? = null)

Creates a request with passed content unit and request data.

Parameters

contentUnit

Advertisement content unit.

profiles

Optional map into which you can pass key-value pairs for targeting profile.

keywords

Optional comma separated list of keywords that can be used to make partial or complete keyword list targeting.

window

Optional advertisement window.

timeoutAfterSeconds

Fail with AdError.TimedOut if no response is received from the server within the given time. Default value is 10 seconds.

gdprPd

If you use profiles, you can optionally set this value to true to tell the ad server that profiles contains personal information about the user.

campaignId

You are able to enforce to get a banner from a specific campaign from the backend. The parameter will work only if bannerId is also specified.

bannerId

You are able to enforce to get a specific banner from the backend. The parameter will work only if campaignId is also specified.

isSHBEnabled

Defines, if the request should also consider the server side header bidding. Used to override a global parameter for an individual AdRequest.

dsa

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. Used to override a global parameter for an individual AdRequest.


constructor(learningTag: Map<String, String>, profiles: HashMap<String, String> = hashMapOf(), keywords: List<String> = listOf(), window: UInt? = null, timeoutAfterSeconds: UInt? = null, gdprPd: Boolean? = null, campaignId: String? = null, bannerId: String? = null, isSHBEnabled: Boolean? = null, dsa: AdRequestGlobalParameters.DSA? = null)

Creates a request with passed learning tag and request data.

Parameters

learningTag

Key-value pairs that are attached to content units.

profiles

Optional map into which you can pass key-value pairs for targeting profile.

keywords

Optional comma separated list of keywords that can be used to make partial or complete keyword list targeting.

window

Optional advertisement window.

timeoutAfterSeconds

Fail with AdError.TimedOut if no response is received from the server within the given time. Default value is 10 seconds.

gdprPd

If you use profiles, you can optionally set this value to true to tell the ad server that profiles contains personal information about the user.

campaignId

You are able to enforce to get a banner from a specific campaign from the backend. The parameter will work only if bannerId is also specified.

bannerId

You are able to enforce to get a specific banner from the backend. The parameter will work only if campaignId is also specified.

isSHBEnabled

Defines, if the request should also consider the server side header bidding. Used to override a global parameter for an individual AdRequest.

dsa

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. Used to override a global parameter for an individual AdRequest.