Skip to content

Commit

Permalink
Update adxcgBidAdapter.js - native fix (prebid#4534)
Browse files Browse the repository at this point in the history
* Update adxcgBidAdapter.js  - native fix

* trigger CI

* trigger CI

* Code reformat and adding ending semicolons. No other changes

Reformatted the code in separate commit before real changes

* update adxcgBidAdapter_spec

general cleanup - removed duplicated jsons
added native size check
added many url querystring http call parameter checks

* trigger CI
  • Loading branch information
adxcgcom authored and tadam75 committed Jan 9, 2020
1 parent 4fa808d commit 6f8a648
Show file tree
Hide file tree
Showing 2 changed files with 484 additions and 409 deletions.
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)
Loading

0 comments on commit 6f8a648

Please sign in to comment.