Prebid Mobile supports the following global targeting parameters. These targeting parameters are set only once and apply to all Prebid Mobile ad units. They do not change for a given user session.
You can retrieve and set the year of birth for targeting:
yob = TargetingParams.getYearOfBirth();
TargetingParams.setYearOfBirth(1990);
You can retrieve and set the following values for gender:
FEMALE
MALE
UNKNOWN
gender = TargetingParams.getGender();
TargetingParams.setGender(FEMALE);
User keywords are a list of keywords, intrests or intent as defined by user.keywords in OpenRTB 2.5. Any keywords passed in the UserKeywords object may be passsed to DSPs.
void addUserKeyword(String keyword)
void addUserKeywords(Set<String> keywords)
void removeUserKeyword(String keyword)
void clearUserKeywords()
Example:
TargetingParams.addUserKeyword("globalUserKeywordValue1")
TargetingParams.addUserKeyword("globalUserKeywordValue2")
Use the following code to retrieve the platform-specific bundle/package name:
bundleName = TargetingParams.getBundleName();
Pass in the platform-specific identifier - the bundle/package name - to set the bundle ID:
TargetingParams.setBundleName(bundleName);
Retrieve and set the domain of your app with the following commands:
domain = TargetingParams.getDomain();
TargetingParams.setDomain(domain);
Retrieve and set your app’s store URL:
storeUrl = TargetingParams.getStoreUrl();
TargetingParams.setStoreUrl(storeUrl);
Context Keywords are a list of keywords about the app as referenced in OpenRTB 2.5 as app.keywords. Any keyword passed in the context keyword field may be passed to the buyer for targeting.
Add Context Keywords
void addContextKeyword(String keyword)
void addContextKeywords(Set<String> keywords)
Remove Context Keywords
void removeContextKeyword(String keyword)
Clear all Keywords
void clearContextKeywords()
Example:
TargetingParams.addContextKeyword("globalContextKeywordValue1")
TargetingParams.addContextKeyword("globalContextKeywordValue2")
First Party Data (FPD) is free form data supplied by the publisher to provide additional targeting of the user or inventory context, used primarily for striking PMP (Private MarketPlace) deals with Advertisers. Data supplied in the data parameters are typically not sent to DSPs whereas information sent in non-data objects (i.e. setYearOfBirth
, setGender
, etc.) will be. Access to FPD can be limited to a supplied set of Prebid bidders via an access control list.
Data is broken up into two different data types:
The below first party user and inventory context will apply to all ad units. For ad unit level first party data, refer to First Partay Data section in the Ad Unit page.
User specic data is passed in the global scope (i.e. applicable to all ad units).
void addUserData(String key, String value)
void updateUserData(String key, Set<String> value)
void removeUserData(String key)
void clearUserData()
Example:
TargetingParams.addUserData("globalUserDataKey1", "globalUserDataValue1")
Inventory specific free form data decribing the context of the inventory.
Add Context data
void addContextData(String key, String value)
Update Context Data
void updateContextData(String key, Set<String> value)
Remove Context Data
void removeContextData(String key)
Clear Context Data
void clearContextData()
Example:
TargetingParams.addContextData("globalContextDataKey1", "globalContextDataValue1, globalContextDataValue2")
For ad unit context data, please refer to the ad unit section.
The First Party Data Access Control List provides a method to restrict access to first party data to a supplied list of bidders.
Only bidders supplied in the ACL will have access to the first party data. If no bidder is supplied, Prebid Server will supply first party data to all bid adapers.
void addBidderToAccessControlList(String bidderName)
Remove Bidder from Access Control List
void removeBidderFromAccessControlList(String bidderName)
Clear Access Control List
void clearAccessControlList()
Example:
TargetingParams.addBidderToAccessControlList(TargetingParams.BIDDER_NAME_RUBICON_PROJECT);
Prebid Mobile supports the IAB GDPR recommendations. For a general overview of Prebid Mobile support for GDPR, see Prebid Mobile Guide to European Ad Inventory and Providing Notice, Transparency and Choice
Enable (true) or disable (false) the ability to provide consent.
TargetingParams.setSubjectToGDPR(context, true);
Retrieve the consent string.
context = TargetingParams.getGDPRConsentString();
Enable publishers to set the consent string.
TargetingParams.setGDPRConsentString(context, "consent_string");
Prebid mobile also checks if the values are present in the SharedPreferences keys specified by the IAB. If the values are also set in these objects they will be passed in the OpenRTB request object.
Prebid supports passing of the Child Online Privacy Prection (COPPA) signal to Prebid Server (PBS) for all COPPA traffic. When PBS receives the COPPA flag we strip out all personal data from the requeset. For a general overview of COPPA, see the FTC’s guidlines.
Set Subject to COPPA
void setSubjectToCOPPA(boolean consent)
Example:
TargetingParams.setSubjectToCOPPA(true);