Prebid allows publishers to supply attributes related to their content and users, and to apply permissions so only certain bidders are allowed to access those attributes.
These conventions aren’t implemented by all adapters. Please check with each of your bidders to make sure they’re reading first party data from the standard Prebid locations.
This document covers the method of specifying First Party Data as of Prebid.js 4.30, which
we recommend all publishers use. In previous versions of Prebid.js, the interface was
to set fpd
values. We now use the more generic ortb2
interface,
which can be used for more than just First Party Data.
Publishers supply First Party Data (FPD) by specifying attributes as configuration or on a Prebid.js AdUnit:
setConfig()
ortb2
parameter of requestBids()
setBidderConfig()
The Prebid First Party Data JSON structure reflects the OpenRTB standard.
ortb2.site.ext.data
or ortb2.user.data
.ortb2.site
or ortb2.user
. Specfically, the standard values for ‘site’ are: name, domain, cat, sectioncat, pagecat, page, ref, search, keywords. For ‘user’ these are: yob, gender, keywords.ortb2.site.content.data
or ortb2.user.data
using the IAB standard representation.Here’s how a publisher can let all bid adapters have access to first party data that might be useful in ad targeting that’s good in PBJS 4.30 and later:
Note that supplying first party user data may require special consent in certain regions. Prebid.js does not police the passing of user data as part of its GDPR or CCPA modules.
If you’re using PBJS version 4.29 or before, replace the following in the example above: ‘ortb’ with ‘fpd’, ‘site’ with ‘context’ and ‘site.ext.data’ with ‘context.data’.
In some situations the same page may wish to supply different site
data for some of its sections,
for example in infinite scroll or instream video scenarios where multiple pieces of content that would benefit from different contexts are served together.
To support this use case, Prebid version 7 and above accepts auction-specific first-party data as a parameter to requestBids
. For example:
If an attribute is specific to an AdUnit, it can be passed this way:
Prebid does not support AdUnit-specific user data, nor does it support
bidder-specific AdUnit First Party Data. You could implement either of
these scenarios with a publisher-specific callback on the requestBids
event
If you’re using PBJS version 4.29 or before, replace the following in the example above: ‘ortb2Imp.ext.data’ with ‘fpd.context.data’.
Use the setBidderConfig()
function to supply bidder-specific data. In this example, only bidderA and bidderB will get access to the supplied
global data.
Occasionally, an app which embeds a webview might run Prebid.js. In this case, the app object is often specified for OpenRTB, and the site object would be invalid. When this happens, one should specify app.content.data in place of site.content.data.
OpenRTB content
object describes specific (mostly audio/video) content information, and it is useful for targeting.
For website ad, the content object should be defined in ortb2.site.content
, for non-browser ad, it should be defined in ortb2.app.content
The IAB offers standard content and audience taxonomies for categorizing sites and users. Prebid supports defining these values as first party data in site.content.data
or user.data
as shown in the examples above.
Segment support is still under development. You can follow the Prebid.js discussion if you’d like.
user: {
data: [{
name: "dataprovider.com", // who resolved the segments
ext: { segtax: 4 }, // taxonomy used to encode the segments
segment: [
{ id: "1" }
]
}],
The new extension is segtax
, which identifies the specific taxonomy used to
determine the provided segments. This model supports using taxonomies other
than IAB taxonomies, but all taxonomies must be registered with the IAB to be
assigned a number. Once the IAB finalizes the process, we’ll place a link
here to their page. For now, here’s the beta table defining the segtax values:
Segtax ID | Taxonomy Type | Version | Description |
---|---|---|---|
1 | Content | 1.x | IAB - Content Taxonomy version 1 |
2 | Content | 2.x | IAB - Content Taxonomy version 2 |
4 | Audience | 1.1 | IAB - Audience Taxonomy version 1.1 |
The IAB version of this table is associated with ADCOM. Publishers should check with their SSPs and DSPs to confirm which segment taxonomies they support.
Prebid.js bid adapters are supplied global data in the ortb2
property of bid requests:
AdUnit-specific values must be parsed out of the AdUnit object.
The assumption is that bid adapters will copy the values to the appropriate protocol location for their endpoint.
See Prebid Server First Party Data for a discussion of this feature for Prebid Server bid adapters.