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

Update adxcgBidAdapter.js - native fix #4534

Merged
merged 6 commits into from
Dec 9, 2019
Merged
Changes from 3 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
10 changes: 9 additions & 1 deletion modules/adxcgBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import includes from 'core-js/library/fn/array/includes'
* updated to pass aditional auction and impression level parameters. added pass for video targeting parameters
* updated to fix native support for image width/height and icon 2019.03.17
* updated support for userid - pubcid,ttid 2019.05.28
* updated to support prebid 3.0 -remove non https, move to banner.xx.sizes, remove utils.getTopWindowLocation,remove utils.getTopWindowUrl(),remove utils.getTopWindowReferrer()
* updated to support prebid 3.0 - remove non https, move to banner.xx.sizes, remove utils.getTopWindowLocation,remove utils.getTopWindowUrl(),remove utils.getTopWindowReferrer()
*/

const BIDDER_CODE = 'adxcg'
Expand Down Expand Up @@ -131,6 +131,10 @@ export const spec = {
sizes.push(utils.parseSizesInput(bid.mediaTypes.banner.sizes).join('|'))
}

if (isNativeRequest(bid)) {
sizes.push('0x0')
}

let bidfloor = utils.getBidIdParameter('bidfloor', bid.params) || 0
bidfloors.push(bidfloor)
// copy video params
Expand Down Expand Up @@ -293,4 +297,8 @@ function isBannerRequest (bid) {
return bid.mediaType === 'banner' || !!utils.deepAccess(bid, 'mediaTypes.banner')
}

function isNativeRequest (bid) {
return bid.mediaType === 'native' || !!utils.deepAccess(bid, 'mediaTypes.native')
}

registerBidder(spec)