Skip to content

Commit

Permalink
RTB House Bid Adapter: Add SDA support based on ortb2 object (#8918)
Browse files Browse the repository at this point in the history
* RTBHouse Bid Adapter: add global vendor list id

* structured user agent - browsers.brands

* fix lint errors

* Added sda into rtbhouse adapter

* spreading ortb2: user & site props

* examples reverted

Co-authored-by: Leandro Otani <leandro.otani@rtbhouse.com>
Co-authored-by: rtbh-lotani <83652735+rtbh-lotani@users.noreply.github.com>
Co-authored-by: Tomasz Swirski <tomasz.swirski@rtbhouse.com>
  • Loading branch information
4 people committed Aug 30, 2022
1 parent 29448af commit 7d3ad07
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions modules/rtbhouseBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,30 @@ export const spec = {
}
}

const ortb2Params = bidderRequest && bidderRequest.ortb2;
if (ortb2Params?.user) {
request.user = {
...request.user,
...(ortb2Params.user.data && {
data: { ...request.user?.data, ...ortb2Params.user.data },
}),
...(ortb2Params.user.ext && {
ext: { ...request.user?.ext, ...ortb2Params.user.ext },
}),
};
}
if (ortb2Params?.site) {
request.site = {
...request.site,
...(ortb2Params.site.content && {
content: { ...request.site?.content, ...ortb2Params.site.content },
}),
...(ortb2Params.site.ext && {
ext: { ...request.site?.ext, ...ortb2Params.site.ext },
}),
};
}

return {
method: 'POST',
url: 'https://' + validBidRequests[0].params.region + '.' + ENDPOINT_URL,
Expand Down

0 comments on commit 7d3ad07

Please sign in to comment.