You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DigiTrust is an optional module for pubs, but in order for adapters to support it, there's a small function that could be made a standard part of utils. This will save adapters from duplicating code.
Suggested code
Based on the code implemented in the Rubicon bid adapter:
exports.getDigiTrustQueryParams=function (defaultMemberId) {
function getDigiTrustId(defaultMemberId) {
let digiTrustUser = window.DigiTrust && (config.getConfig('digiTrustId') || window.DigiTrust.getUser({member: defaultMemberId}));
return (digiTrustUser && digiTrustUser.success && digiTrustUser.identity) || null;
}
let digiTrustId = getDigiTrustId(defaultMemberId);
// Verify there is an ID and this user has not opted out
if (!digiTrustId || (digiTrustId.privacy && digiTrustId.privacy.optout)) {
return [];
}
return {
'dt.id': digiTrustId.id,
'dt.keyv': digiTrustId.keyv,
'dt.pref': 0
};
}
Other information
Note that similar code is also used in the prebidServerBidAdapter
The point of this utility function would be for simplified adapter support of the module. Each adapter needs to do the same things to look for DigiTrust config -- this makes it a one-liner for each.
Publishers still wouldn't be able to use DigiTrust without including the pseudo-module. Note that we don't currently have real module support for DigiTrust yet -- until their library is converted to an NPM package, which is on our list.
Type of issue
cross-adapter utility library request
Description
DigiTrust is an optional module for pubs, but in order for adapters to support it, there's a small function that could be made a standard part of utils. This will save adapters from duplicating code.
Suggested code
Based on the code implemented in the Rubicon bid adapter:
Other information
Note that similar code is also used in the prebidServerBidAdapter
More info on DigiTrust at http://prebid.org/dev-docs/modules/digitrust.html
The text was updated successfully, but these errors were encountered: