Skip to content

Commit

Permalink
TTD Bid Adapter: add support for site.ref & user.data (#9107)
Browse files Browse the repository at this point in the history
* Update ttdBidAdapter.js

* Update ttdBidAdapter.js

* Update ttdBidAdapter.js
  • Loading branch information
patmmccann authored Oct 17, 2022
1 parent 86bc747 commit 5de1a29
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/ttdBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,20 @@ function getUser(bidderRequest) {
utils.deepSetValue(user, 'ext.eids', eids);
}

// gather user.data
const ortb2UserData = utils.deepAccess(bidderRequest, 'ortb2.user.data');
if (ortb2UserData && ortb2UserData.length) {
user = utils.mergeDeep(user, {
data: [...ortb2UserData]
});
};
return user;
}

function getSite(bidderRequest, firstPartyData) {
var site = {
page: utils.deepAccess(bidderRequest, 'refererInfo.page'),
ref: utils.deepAccess(bidderRequest, 'refererInfo.ref'),
publisher: {
id: utils.deepAccess(bidderRequest, 'bids.0.params.publisherId'),
},
Expand Down

0 comments on commit 5de1a29

Please sign in to comment.