Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kueezRtb Bid Adapter: pass sua data to server. #9643

Merged
merged 1 commit into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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