Skip to content

Commit

Permalink
kueezRtb Bid Adapter: pass sua data to server. (#9643)
Browse files Browse the repository at this point in the history
  • Loading branch information
saar120 authored Mar 9, 2023
1 parent f61e11d commit 7785060
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/kueezRtbBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {

appendUserIdsToRequestPayload(data, userId);

const sua = deepAccess(bidderRequest, 'ortb2.device.sua');

if (sua) {
data.sua = sua;
}

if (bidderRequest.gdprConsent) {
if (bidderRequest.gdprConsent.consentString) {
data.gdprConsent = bidderRequest.gdprConsent.consentString;
Expand Down
50 changes: 50 additions & 0 deletions test/spec/modules/kueezRtbBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,24 @@ const BIDDER_REQUEST = {
'regs': {
'gpp': 'gpp_string',
'gpp_sid': [7]
},
'device': {
'sua': {
'source': 2,
'platform': {
'brand': 'Android',
'version': ['8', '0', '0']
},
'browsers': [
{'brand': 'Not_A Brand', 'version': ['99', '0', '0', '0']},
{'brand': 'Google Chrome', 'version': ['109', '0', '5414', '119']},
{'brand': 'Chromium', 'version': ['109', '0', '5414', '119']}
],
'mobile': 1,
'model': 'SM-G955U',
'bitness': '64',
'architecture': ''
}
}
}
};
Expand Down Expand Up @@ -263,6 +281,22 @@ describe('KueezRtbBidAdapter', function () {
res: `${window.top.screen.width}x${window.top.screen.height}`,
schain: VIDEO_BID.schain,
sizes: ['545x307'],
sua: {
'source': 2,
'platform': {
'brand': 'Android',
'version': ['8', '0', '0']
},
'browsers': [
{'brand': 'Not_A Brand', 'version': ['99', '0', '0', '0']},
{'brand': 'Google Chrome', 'version': ['109', '0', '5414', '119']},
{'brand': 'Chromium', 'version': ['109', '0', '5414', '119']}
],
'mobile': 1,
'model': 'SM-G955U',
'bitness': '64',
'architecture': ''
},
uniqueDealId: `${hashUrl}_${Date.now().toString()}`,
uqs: getTopWindowQueryParams(),
mediaTypes: {
Expand Down Expand Up @@ -310,6 +344,22 @@ describe('KueezRtbBidAdapter', function () {
bidderTimeout: 3000,
bidderRequestId: '1fdb5ff1b6eaa7',
sizes: ['300x250', '300x600'],
sua: {
'source': 2,
'platform': {
'brand': 'Android',
'version': ['8', '0', '0']
},
'browsers': [
{'brand': 'Not_A Brand', 'version': ['99', '0', '0', '0']},
{'brand': 'Google Chrome', 'version': ['109', '0', '5414', '119']},
{'brand': 'Chromium', 'version': ['109', '0', '5414', '119']}
],
'mobile': 1,
'model': 'SM-G955U',
'bitness': '64',
'architecture': ''
},
url: 'https%3A%2F%2Fwww.greatsite.com',
referrer: 'https://www.somereferrer.com',
cb: 1000,
Expand Down

0 comments on commit 7785060

Please sign in to comment.