Skip to content

Commit

Permalink
Vidazoo bid adapter: support schain param (prebid#8045)
Browse files Browse the repository at this point in the history
* feat(module): multi size request

* fix getUserSyncs
added tests

* update(module): package-lock.json from master

* feat(module): padding 'schain' param to the server

Co-authored-by: roman <[email protected]>
  • Loading branch information
uditalias and shmoop207 authored Feb 10, 2022
1 parent 147198b commit b52ae8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions modules/vidazooBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function isBidRequestValid(bid) {
}

function buildRequest(bid, topWindowUrl, sizes, bidderRequest) {
const { params, bidId, userId, adUnitCode } = bid;
const { params, bidId, userId, adUnitCode, schain } = bid;
const { bidFloor, ext } = params;
const hashUrl = hashCode(topWindowUrl);
const dealId = getNextDealId(hashUrl);
Expand All @@ -71,7 +71,8 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest) {
uniqueDealId: uniqueDealId,
bidderVersion: BIDDER_VERSION,
prebidVersion: '$prebid.version$',
res: `${screen.width}x${screen.height}`
res: `${screen.width}x${screen.height}`,
schain: schain
};

appendUserIdsToRequestPayload(data, userId);
Expand Down
4 changes: 3 additions & 1 deletion test/spec/modules/vidazooBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const BID = {
'transactionId': 'c881914b-a3b5-4ecf-ad9c-1c2f37c6aabf',
'sizes': [[300, 250], [300, 600]],
'bidderRequestId': '1fdb5ff1b6eaa7',
'requestId': 'b0777d85-d061-450e-9bc7-260dd54bbb7a'
'requestId': 'b0777d85-d061-450e-9bc7-260dd54bbb7a',
'schain': 'a0819c69-005b-41ed-af06-1be1e0aefefc'
};

const BIDDER_REQUEST = {
Expand Down Expand Up @@ -163,6 +164,7 @@ describe('VidazooBidAdapter', function () {
uniqueDealId: `${hashUrl}_${Date.now().toString()}`,
bidderVersion: adapter.version,
prebidVersion: version,
schain: BID.schain,
res: `${window.top.screen.width}x${window.top.screen.height}`,
'ext.param1': 'loremipsum',
'ext.param2': 'dolorsitamet',
Expand Down

0 comments on commit b52ae8b

Please sign in to comment.