diff --git a/modules/rtbhouseBidAdapter.js b/modules/rtbhouseBidAdapter.js index 93a999f0bb7..fdf64483da7 100644 --- a/modules/rtbhouseBidAdapter.js +++ b/modules/rtbhouseBidAdapter.js @@ -81,12 +81,28 @@ export const spec = { } } - const clientHints = getClientHints(); - if (clientHints) { - const { device = {} } = request; - const { sua = {} } = device; - device.sua = { ...sua, ...clientHints }; - request.device = device; + 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 { @@ -428,19 +444,3 @@ function interpretNativeAd(adm) { }); return result; } - -function getClientHints() { - let clientHints = {}; - const { userAgentData = {} } = navigator; - - const { brands = [] } = userAgentData; - if (brands.length > 0) { - clientHints.browsers = brands; - } - - if (Object.keys(clientHints).length === 0) { - clientHints = null; - } - - return clientHints; -}