This module adds a number of First Party Data (FPD) fields from the environment.
Add it to the Prebid.js build with this command:
gulp build --modules=enrichmentFpdModule
If included in the build, it will automatically perform the enrichments unless controlled with setConfig:
pbjs.setConfig({
firstPartyData: {
skipEnrichments: true // defaults to false
}
});
When the first auction on the page is run, this module merges a number of values into the ortb2
object. Specific details below.
If the publisher needs to refresh the enriched FPD after the first auction, this can be done using a function provided by this module:
pbjs.refreshFpd();
Page Source | ortb2 field | Notes |
---|---|---|
page URL | site.page | Uses pbjs getRefererInfo().canonicalUrl |
referer URL | site.ref | Uses pbjs getRefererInfo().referer |
host domain | site.domain | Pulled from the getRefererInfo().canonicalUrl the host domain is used with the www component dropped. |
aggregated domain | site.publisher.domain | The highest level domain in which cookies can be set. |
viewport width | device.w | Hunts for window.innerWidth, window.document.documentElement.clientWidth, window.document.body.clientWidth |
viewport height | device.w | Hunts for window.innerHeight, window.document.documentElement.clientHeight, window.document.body.clientHeight |
meta keywords | site.keywords | Looks for a meta tag. e.g. |
currency | cur | Collects the currency defined by the Currency module. |