First Party Data Enrichment Module

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:

    firstPartyData: {
        skipEnrichments: true   // defaults to false

How it works

At the beginning of each auction, this module merges a number of values into the ortb2 requestBids parameter. Specific details below.


Page Source ortb2 field Notes
page URL Uses pbjs getRefererInfo().page
referer URL site.ref Uses pbjs getRefererInfo().ref
host domain site.domain Pulled from the getRefererInfo().page 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
UA client hints device.sua Collects user agent client hints. See note below.
meta keywords site.keywords Looks for a meta tag. e.g.
currency cur Collects the currency defined by the Currency module.

User agent client hints

The module populates device.sua with UA client hints retrieved from navigator.userAgentData. By default, it asks for every available high entropy hint; you may specify the list of hints with the uaHints option:

    firstPartyData: {
        uaHints: [
            // ...

If uaHints is set to an empty array, the module will not attempt to retrieve any high entropy hint and use only the available low-entropy values.

Related Reading