Class TargetingParams
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addBidderToAccessControlList
(String bidderName) This method obtains a bidder name allowed to receive global targeting (ext.prebid.data)static void
addExtData
(String key, String value) This method obtains the context data keyword & value context for global context targeting if the key already exists the value will be appended to the list.static void
addUserKeyword
(String keyword) This method obtains the user keyword for global user targeting Inserts the given element in the set if it is not already present.static void
addUserKeywords
(Set<String> keywords) This method obtains the user keyword set for global user targeting Adds the elements of the given set to the set.static void
This method allows to remove all the bidder name setstatic void
This method allows to remove all context data set from global context targetingstatic void
This method allows to remove all keywords from the set of global user targetingstatic String
Get the platform-specific identifier, should be bundle/package namestatic Boolean
Gets the device access consent set by the publisher.
If custom Prebid subject and purpose consent set, gets device access from them.static String
Get the domain of your appstatic List<ExternalUserId>
Returns external user ids.static String
Gets any given GDPR consent in that order.static String
static String
OMID signalingstatic String
static String
static Boolean
getPurposeConsent
(int index) Gets any given purpose consent for set index in that order.static String
Gets any given purpose consent for set index in that order.static Boolean
static ExternalUserId
A randomly generated Prebid-owned first-party identifier Unless reset, SharedID remains consistent throughout the current app session.static String
Get the store url of your appstatic Ext
static String
static Boolean
Gets subject to COPPA.static Boolean
Gets any given subject to GDPR in that order.static void
removeBidderFromAccessControlList
(String bidderName) This method allows to remove specific bidder namestatic void
removeExtData
(String key) This method allows to remove specific context data keyword & values set from global context targetingstatic void
removeUserKeyword
(String keyword) This method allows to remove specific user keyword from global user targetingstatic void
Resets and clears out of local storage the existing SharedID value, after which `TargetingParams.sharedId` will return a new randomized value.static void
setBundleName
(String bundleName) Set the platform-specific identifier for targeting purpose Should be bundle/package namestatic void
Set the domain of your app for targeting purposestatic void
setExternalUserIds
(List<ExternalUserId> userIds) Sets external user ids.static void
setGDPRConsentString
(String consent) Sets GDPR consent for Prebid.static void
setGlobalOrtbConfig
(String config) Sets global OpenRTB JSON string for merging with the original request.static void
setOmidPartnerName
(String omidPartnerName) static void
setOmidPartnerVersion
(String omidPartnerVersion) static void
setPublisherName
(String publisherName) Sets publisher namestatic void
setPurposeConsents
(String purposeConsents) Sets Prebid custom GDPR purpose consents (device access consent).static void
setSendSharedId
(Boolean sendSharedId) When true, the SharedID external user id is added to outgoing auction requests.static void
setStoreUrl
(String storeUrl) Set the store url of your appstatic void
setSubjectToCOPPA
(Boolean value) Sets subject to COPPA.static void
setSubjectToGDPR
(Boolean value) Sets subject to GDPR for Prebid.static void
setUserExt
(Ext ext) Sets user Extstatic void
setUserLatLng
(Float latitude, Float longitude) Sets user latitude and longitudestatic void
updateExtData
(String key, Set<String> value) This method obtains the context data keyword & values set for global context targeting.
-
Method Details
-
setUserLatLng
Sets user latitude and longitude- Parameters:
latitude
- User latitudelongitude
- User longitude
-
getUserLatLng
-
addUserKeyword
This method obtains the user keyword for global user targeting Inserts the given element in the set if it is not already present. -
addUserKeywords
This method obtains the user keyword set for global user targeting Adds the elements of the given set to the set. -
removeUserKeyword
This method allows to remove specific user keyword from global user targeting -
clearUserKeywords
public static void clearUserKeywords()This method allows to remove all keywords from the set of global user targeting -
getUserKeywords
-
getUserKeywordsSet
-
setExternalUserIds
Sets external user ids. Set null for clearing. See:ExternalUserId
. -
getExternalUserIds
Returns external user ids. -
setPublisherName
Sets publisher name- Parameters:
publisherName
- Publisher name
-
getPublisherName
-
setDomain
Set the domain of your app for targeting purpose- Parameters:
domain
- domain of your app
-
getDomain
Get the domain of your app- Returns:
- domain of your app
-
setStoreUrl
Set the store url of your app- Parameters:
storeUrl
- store url
-
getStoreUrl
Get the store url of your app- Returns:
- store url
-
getBundleName
Get the platform-specific identifier, should be bundle/package name -
setBundleName
Set the platform-specific identifier for targeting purpose Should be bundle/package name -
addExtData
This method obtains the context data keyword & value context for global context targeting if the key already exists the value will be appended to the list. No duplicates will be added (app.ext.data) -
updateExtData
This method obtains the context data keyword & values set for global context targeting. the values if the key already exist will be replaced with the new set of values -
removeExtData
This method allows to remove specific context data keyword & values set from global context targeting -
clearExtData
public static void clearExtData()This method allows to remove all context data set from global context targeting -
getExtDataDictionary
-
addBidderToAccessControlList
This method obtains a bidder name allowed to receive global targeting (ext.prebid.data) -
removeBidderFromAccessControlList
This method allows to remove specific bidder name -
clearAccessControlList
public static void clearAccessControlList()This method allows to remove all the bidder name set -
getAccessControlList
-
getOmidPartnerName
OMID signaling -
setOmidPartnerName
-
getOmidPartnerVersion
-
setOmidPartnerVersion
-
setSubjectToCOPPA
Sets subject to COPPA. Null to set undefined.
Must be called only after
PrebidMobile.initializeSdk(Context, String, SdkInitializationListener)
. -
isSubjectToCOPPA
Gets subject to COPPA. Null is undefined.
Must be called only after
PrebidMobile.initializeSdk(Context, String, SdkInitializationListener)
. -
setSubjectToGDPR
Sets subject to GDPR for Prebid. It uses custom static field, not IAB.
Must be called only after
PrebidMobile.initializeSdk(Context, String, SdkInitializationListener)
. -
isSubjectToGDPR
Gets any given subject to GDPR in that order.
1) Prebid subject to GDPR custom value, if present.
2) IAB subject to GDPR TCF 2.0.
Otherwise, null.
Must be called only after
PrebidMobile.initializeSdk(Context, String, SdkInitializationListener)
. -
setGDPRConsentString
Sets GDPR consent for Prebid. It uses custom static field, not IAB.
Must be called only after
PrebidMobile.initializeSdk(Context, String, SdkInitializationListener)
. -
getGDPRConsentString
Gets any given GDPR consent in that order.
1) Prebid GDPR consent custom value, if present.
2) IAB GDPR consent TCF 2.0.
Otherwise, null.
Must be called only after
PrebidMobile.initializeSdk(Context, String, SdkInitializationListener)
. -
setPurposeConsents
Sets Prebid custom GDPR purpose consents (device access consent).
Must be called only after
PrebidMobile.initializeSdk(Context, String, SdkInitializationListener)
. -
getPurposeConsent
Gets any given purpose consent for set index in that order.
1) Prebid GDPR purpose consent custom value, if present.
2) IAB GDPR TCF 2.0 purpose consent.
Returns null if purpose consent isn't set or index is out of bounds.
Must be called only after
PrebidMobile.initializeSdk(Context, String, SdkInitializationListener)
. -
getPurposeConsents
Gets any given purpose consent for set index in that order.
1) Prebid GDPR purpose consent custom value, if present.
2) IAB GDPR TCF 2.0 purpose consent.
Otherwise, null.Must be called only after
PrebidMobile.initializeSdk(Context, String, SdkInitializationListener)
. -
getDeviceAccessConsent
Gets the device access consent set by the publisher.
If custom Prebid subject and purpose consent set, gets device access from them. Otherwise, from IAB standard.Must be called only after
PrebidMobile.initializeSdk(Context, String, SdkInitializationListener)
. -
getGlobalOrtbConfig
-
setGlobalOrtbConfig
Sets global OpenRTB JSON string for merging with the original request. Expected format:"{"new_field": "value"}"
.- Parameters:
config
- JSON OpenRTB string.
-
setUserExt
public static void setUserExt(Ext ext) Sets user Ext- Parameters:
ext
- Placeholder for exchange-specific extensions to OpenRTB.
-
getUserExt
public static Ext getUserExt()
-