userId
and
id5IdSystem
modules, in addition to the other modules you normally include.
gulp build –modules=userId,id5IdSystem
pbjs.setConfig()
function, add the following configuration before you make a request for bids:
pbjs.setConfig({ userSync: { userIds: [{ name: 'id5Id', params: { partner: 173, // change to the Partner Number you received from ID5 pd: 'MT1iNTBjY...' // optional, see below for a link to how to generate the pd string abTesting: { // optional enabled: true, // false by default controlGroupPct: 0.1 // valid values are 0.0 - 1.0 (inclusive) } }, storage: { type: 'html5', // 'html5' is the required storage type name: 'id5id', // 'id5id' is the required storage name expires: 90, // storage lasts for 90 days refreshInSeconds: 8*3600 // refresh ID every 8 hours to ensure it's fresh } }], auctionDelay: 250 // 250ms maximum auction delay, applies to all userId modules } });
storage.type
to be
"html5"
and
storage.name
to be
"id5id"
. Using other values will display a warning today, but in an upcoming release, it may prevent the ID5 module from loading. This change is to ensure the ID5 module in Prebid.js interoperates properly with the
ID5 API and to reduce the size of publishers' first-party cookies that are sent to their web servers. If you have any questions, please reach out to us at
prebid@id5.io.
Name
|
Required
|
Type
|
Description
|
Example
|
partner
|
Required
|
Number
|
This is the ID5 Partner Number obtained from registering with ID5.
|
173
|
pd
|
Optional
|
String
|
Publisher-supplied data, such as hashed email address or publisher user id, used for linking ID5 IDs across domains. Omit the parameter or leave as an empty string if no data to supply.
Learn how to populate this field.
|
"MT1iNTBjY..."
|
abTesting
|
Optional
|
Object
|
Allows publishers to easily run an A/B Test. If enabled and the user is in the Control Group, the ID5 ID will NOT be exposed to bid adapters for that user. See below for more details.
|
Disabled by default
|
abTesting.enabled
|
Optional
|
Boolean
|
Set this to true to turn on this feature
|
true
|
abTesting.controlGroupPct
|
Optional
|
Number
|
Must be a number between 0.0 and 1.0 (inclusive) and is used to determine the percentage of users that fall into the control group (and thus not exposing the ID5 ID). For example, a value of 0.20 will result in 20% of user without an ID5 ID and 80% with an ID.
|
0.10
|
disableExtensions | Optional | Boolean | Set this to true to force turn off extensions call. Default false | true |
... params: { partner: 173, // change to the Partner Number you received from ID5 pd: 'MT1iNTBjYTA4MjcxNzk1YThlN2U0MDEyODEzZjIzZDUwNTE5M2Q3NWMwZjJlMmJiOTliYWE2M2FhODIyZjY2ZWQzJjU9bSVDMyVCNmxsZXIlMjZmcmFuJUMzJUE3b2lz'
}, ...
ext.abTestingControlGroup
will be set to
true
or
false
and can be used to inform reporting systems that the user was in the control group or not. It's important to note that the control group is user based, and not request based. In other words, from one page view to another, a user will always be in or out of the control group without changing.
gulp build –modules=userId,id5IdSystem,consentManagement
setConfig()
function to include
consentManagement
:
pbjs.setConfig({ userSync: { userIds: [{ name: 'id5Id', params: { partner: 173, // change to the Partner Number you received from ID5 pd: 'MT1iNTBjY...' // optional abTesting: { // optional enabled: true, // false by default controlGroupPct: 0.1 // valid values are 0.0 - 1.0 (inclusive) } }, storage: { type: 'html5', // 'html5' is the required storage type name: 'id5id', // 'id5id' is the required storage name expires: 90, // storage lasts for 90 days refreshInSeconds: 8*3600 // refresh ID every 8 hours to ensure it's fresh } }], auctionDelay: 50 // 50ms maximum auction delay, applies to all userId modules }, consentManagement: { cmpApi: 'iab', timeout: 8000 } });
storage.refreshInSeconds
to 8 hours (
8*3600
seconds) or less to ensure all demand partners receive an ID that has been encrypted with the latest key, has up-to-date privacy signals, and allows them to transact against it.