PubProvided ID
The PubProvided ID module allows publishers to set and pass a first-party user identifier into the bid stream. This module has several unique characteristics:
-
The module supports a user-defined function, that generates an eids-style object:
pbjs.setConfig({ userSync: { userIds: [{ name: "pubProvidedId", params: { eidsFunction: getIdsFn // any function that exists in the page } }] } });
Or, the eids values can be passed directly into the
setConfig
ormergeConfig
call:pbjs.mergeConfig({ userSync: { userIds: [{ name: "pubProvidedId", params: { eids: [{ source: "domain.com", uids: [{ id: "value read from a cookie or local storage", atype: 1, ext: { stype: "ppuid" } }] }, { source: "3rdpartyprovided.com", uids: [{ id: "value read from a cookie or local storage", atype: 3, ext: { stype: "dmp" } }] }] } }] } });
If multiple parties are writing to this object in an undetermined order, a setup that feels quite awkward, they should each do something of this nature:
pbjs.mergeConfig({
userSync: {
userIds: (() => {
const uidCfgs = pbjs.getConfig('userSync.userIds') || [];
let ppid = uidCfgs.find(cfg => cfg.name === 'pubProvidedId');
if (!ppid) {
ppid = {name: 'pubProvidedId', params: {eids: []}};
uidCfgs.push(ppid);
}
ppid.params.eids.push({
source: "example.com",
uids: [{
id: "example",
atype: 1,
ext: {
stype: "ppuid"
}
}]
})
return uidCfgs;
})()
}
})
pbjs.refreshUserIds({submoduleNames: ['pubProvidedId']})
In each case, bid adapters will receive the eid values after consent is validated. The above examples, if calling setConfig
instead of mergeConfig
, will overwrite existing known IDs. If there is any possibility other id submodules have already been initiated or multiple scripts on the page are setting these fields, be sure to prefer mergeConfig
.
-
This design allows for the setting of any number of uuids in the eids object. Publishers may work with multiple ID providers and nest their own ID within the same eids object. The opportunity to link a 1st party uuid and a 3rd party generated UUID presents publishers with a unique ability to address their users in a way demand sources will understand.
-
Finally, this module allows publishers to broadcast their user identifier, derived from in-house tech, directly to buyers within the confines of existing compliance (CCPA & GDPR) frameworks.
-
The
eids.uids.ext.stype
“source-type” extension helps downstream entities know what do with the data. Currently defined values are:- dmp - this uid comes from the in-page dmp named in eids.source
- ppuid - this uid comes from the publisher named in eids.source
- other - for setting other id origin signals please use the adCOM!
atype
spec
-
Bid adapters listening for “userIds.pubProvidedId” will not receive a string, please use the userIdAsEids value/function to return the userid as a string.
This module is distinct from the Google Ad Manager PPID; which we enable setting to any identifier that conforms to the character length requirements.
Add it to your Prebid.js package with:
gulp build –modules=pubProvidedIdSystem
PubProvided Configuration
Params under usersync.userIds[] | Scope | Type | Description | Example |
---|---|---|---|---|
name | Required | String | ID value for the ID module | "PubProvided" |
params | Optional | Object | Details for syncing. | |
params.eidsFunction | Optional | function | any function that exists in the page | getIdsFn() |
uids.atype | optional | int | ADCOM - Type of user agent the match is from | "1" |
uids.ext.stype | Optional | String | Description of how the id was generated and by whom eg. (‘ppuid’,’DMP’,’other’) | DMP |