Skip to content

Commit

Permalink
VidazooBidAdapter: get bid floor using bid.getFloor (#9238)
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): VidazooBidAdapter - send top query params to server

* added bid.getFloor handler

Co-authored-by: roman <[email protected]>
Co-authored-by: Saar Amrani <[email protected]>
Co-authored-by: Saar Amrani <[email protected]>
  • Loading branch information
4 people authored Nov 16, 2022
1 parent e7b981d commit f5e6c61
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions modules/vidazooBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {_each, deepAccess, parseSizesInput, parseUrl, uniques} from '../src/utils.js';
import { _each, deepAccess, parseSizesInput, parseUrl, uniques, isFn } from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER } from '../src/mediaTypes.js';
import { getStorageManager } from '../src/storageManager.js';
Expand Down Expand Up @@ -59,7 +59,8 @@ function isBidRequestValid(bid) {

function buildRequest(bid, topWindowUrl, sizes, bidderRequest) {
const { params, bidId, userId, adUnitCode, schain } = bid;
const { bidFloor, ext } = params;
const { ext } = params;
let { bidFloor } = params;
const hashUrl = hashCode(topWindowUrl);
const dealId = getNextDealId(hashUrl);
const uniqueDealId = getUniqueDealId(hashUrl);
Expand All @@ -69,6 +70,18 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest) {
const subDomain = extractSubDomain(params);
const ptrace = getCacheOpt();

if (isFn(bid.getFloor)) {
const floorInfo = bid.getFloor({
currency: 'USD',
mediaType: '*',
size: '*'
});

if (floorInfo.currency === 'USD') {
bidFloor = floorInfo.floor;
}
}

let data = {
url: encodeURIComponent(topWindowUrl),
uqs: getTopWindowQueryParams(),
Expand Down

0 comments on commit f5e6c61

Please sign in to comment.