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

Vidazoo Bid Adapter: pass sua params. #9636

Merged
merged 35 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d1cf0a6
feat(module): multi size request
uditalias Mar 19, 2020
1f9521d
fix getUserSyncs
shmoop207 Mar 24, 2020
8c23b90
update(module): package-lock.json from master
uditalias Mar 24, 2020
84df14e
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Apr 12, 2020
bdeebe4
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 8, 2020
8b343ce
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 17, 2020
3964277
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 1, 2020
5c82e8d
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 13, 2020
f4e3391
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 22, 2020
100c693
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 28, 2020
8b28ac2
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Aug 23, 2020
6edd125
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Sep 6, 2020
a2cbb4a
Merge remote-tracking branch 'upstream/master'
uditalias Nov 15, 2020
cd77e4a
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 20, 2021
4749df1
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 22, 2021
65d6567
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Feb 9, 2022
f88609d
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Feb 10, 2022
1824b31
Merge remote-tracking branch 'upstream/master'
uditalias May 10, 2022
a8bfc95
Merge branch 'prebid:master' into master
uditalias Jul 20, 2022
a96fcc2
feat(module): VidazooBidAdapter - send top query params to server
uditalias Jul 20, 2022
1619bdd
Merge branch 'prebid:master' into master
saar120 Aug 7, 2022
471b215
Merge branch 'prebid:master' into master
saar120 Aug 15, 2022
90ef4d1
Merge branch 'prebid:master' into master
uditalias Sep 4, 2022
b22ea4d
Merge branch 'prebid:master' into master
saar120 Sep 21, 2022
32f5168
Merge branch 'prebid:master' into master
uditalias Oct 2, 2022
869ffa2
Merge branch 'prebid:master' into master
uditalias Nov 14, 2022
8c37122
Merge branch 'prebid:master' into master
uditalias Nov 27, 2022
c9e3fd3
Merge branch 'prebid:master' into master
uditalias Nov 29, 2022
1a62841
Merge branch 'prebid:master' into master
saar120 Dec 27, 2022
6cd9700
Merge branch 'prebid:master' into master
saar120 Jan 30, 2023
5e9a8d3
Merge branch 'prebid:master' into master
saar120 Feb 1, 2023
ba6d278
Merge branch 'prebid:master' into master
uditalias Feb 5, 2023
87c7bec
Merge branch 'prebid:master' into master
uditalias Feb 6, 2023
8635034
Merge branch 'prebid:master' into master
saar120 Mar 8, 2023
34440cd
feat: pass sua params to bid request.
saar120 Mar 8, 2023
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
8 changes: 7 additions & 1 deletion modules/vidazooBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER, VIDEO} from '../src/mediaTypes.js';
import {getStorageManager} from '../src/storageManager.js';
import {bidderSettings} from '../src/bidderSettings.js';
import { config } from '../src/config.js';
import {config} from '../src/config.js';

const GVLID = 744;
const DEFAULT_SUB_DOMAIN = 'prebid';
Expand Down Expand Up @@ -138,6 +138,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/vidazooBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,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 @@ -281,6 +299,22 @@ describe('VidazooBidAdapter', function () {
schain: VIDEO_BID.schain,
sessionId: '',
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(),
isStorageAllowed: true,
Expand Down Expand Up @@ -330,6 +364,22 @@ describe('VidazooBidAdapter', function () {
transactionId: 'c881914b-a3b5-4ecf-ad9c-1c2f37c6aabf',
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