From 3c7271312ec259a1d26b4cde0fe46decc009934b Mon Sep 17 00:00:00 2001
From: jsnellbaker <31102355+jsnellbaker@users.noreply.github.com>
Date: Wed, 11 Dec 2019 15:08:37 -0500
Subject: [PATCH] Prebid 3.0 (#4580)
* Remove pbs depracated legacy url (#4226)
* remove deprecated legacy url from pbs adapter
* fix eslint errors
* add and update tests for openRtb2 endpoint
* sync with master
* Revert "sync with master"
This reverts commit 8c2b1969e4ec796fa8d23ca0a571ddbd77048a30.
* removed targeting set filter and moved where render status is set to work with safeframe creatives (#4236)
* Depracate adloader loadscript fn (#4228)
* test commit
* add callback support to loadExternalScript()
* pass moduleCode for renderers
* test cases for loadExternalScript()
* store callbacks for cached url
* fully remove adloader()
* call callback() from stub
* remove and update function name
* getHighestCpmBids only returns non-rendered bids (#4247)
* Make all adapters https (#4294)
* update all adapters to https
* convert all adapters to https
* update unit tests
* remove files confilicting with other PR
* Removed pub common and unified id submodules as defaults in user id module (#4445)
* Deprecate user sync (#4241)
* deprecate some properties of userSync object
* change bid adapter to Appnexus
* fix 3 failing test cases
* make all unit test cases pass
* remove debugger
* deprecate support for adUnit.sizes for pubs (#4458)
* deprecate support for adUnit.sizes for pubs
* remove commented code
* Deprecations utils.js (#4249)
* deprecate domain/referer type functions
* delete modules that are using deprecated methods from utils.js
* remove reference to getTopWindowLocation
* sync with prebid-3.0 branch
* remove test suite for getTopWindowLocation
* add back md files of all deleted adapters
* add md files of deleted analytics adapters
* add adapters that are 3.0 compliant
* add back the rubicon skipped test
* remove min field from priceGranularity feature (#4574)
---
CONTRIBUTING.md | 2 +-
.../gpt/prebidServer_example.html | 6 +-
modules/.submodules.json | 2 +
modules/7xbidBidAdapter.js | 155 --
modules/a4gBidAdapter.js | 89 --
modules/aardvarkBidAdapter.js | 4 +-
modules/adbutlerBidAdapter.js | 131 --
modules/adformBidAdapter.js | 2 +-
modules/adformOpenRTBBidAdapter.js | 2 +-
modules/adgenerationBidAdapter.js | 2 +-
modules/adkernelAdnAnalyticsAdapter.js | 378 -----
modules/admanBidAdapter.js | 79 -
modules/admaticBidAdapter.js | 4 +-
modules/admediaBidAdapter.js | 2 +-
modules/admixerBidAdapter.js | 73 -
modules/adspendBidAdapter.js | 4 +-
modules/adspiritBidAdapter.js | 72 -
modules/adtelligentBidAdapter.js | 243 ---
modules/aduptechBidAdapter.js | 79 -
modules/advenueBidAdapter.js | 2 +-
modules/ajaBidAdapter.js | 2 +-
modules/andbeyondBidAdapter.js | 168 --
modules/aniviewBidAdapter.js | 191 ---
modules/appnexusBidAdapter.js | 6 +-
modules/arteebeeBidAdapter.js | 190 ---
modules/atomxBidAdapter.js | 2 +-
modules/audienceNetworkBidAdapter.js | 317 ----
modules/betweenBidAdapter.js | 6 +-
modules/bidfluenceBidAdapter.js | 2 +-
modules/bidglassBidAdapter.js | 46 +-
modules/bidphysicsBidAdapter.js | 2 +-
modules/bizzclickBidAdapter.js | 105 --
modules/brainyBidAdapter.js | 154 --
modules/bridgewellBidAdapter.js | 269 ----
modules/c1xBidAdapter.js | 5 +-
modules/ccxBidAdapter.js | 216 ---
modules/cedatoBidAdapter.js | 4 +-
modules/cleanmedianetBidAdapter.js | 300 ----
modules/clickforceBidAdapter.js | 2 +-
modules/collectcentBidAdapter.js | 4 +-
modules/colombiaBidAdapter.js | 72 -
modules/contentigniteBidAdapter.js | 115 --
modules/cosmosBidAdapter.js | 4 +-
modules/cpmstarBidAdapter.js | 6 +-
modules/danmarketBidAdapter.js | 161 --
modules/datablocksBidAdapter.js | 2 +-
modules/decenteradsBidAdapter.js | 90 --
modules/dgadsBidAdapter.js | 103 --
modules/djaxBidAdapter.js | 2 +-
modules/dspxBidAdapter.js | 96 --
modules/ebdrBidAdapter.js | 2 +-
modules/emx_digitalBidAdapter.js | 287 ----
modules/eplanningBidAdapter.js | 395 -----
modules/etargetBidAdapter.js | 2 +-
modules/eywamediaBidAdapter.js | 181 ---
modules/fairtradeBidAdapter.js | 150 --
modules/fidelityBidAdapter.js | 109 --
modules/freewheel-sspBidAdapter.js | 360 -----
modules/fyberBidAdapter.js | 378 -----
modules/gammaBidAdapter.js | 100 --
modules/gamoshiBidAdapter.js | 279 ----
modules/getintentBidAdapter.js | 2 +-
modules/giantsBidAdapter.js | 343 ----
modules/gjirafaBidAdapter.js | 95 --
modules/gridBidAdapter.js | 6 +-
modules/gxoneBidAdapter.js | 141 --
modules/hpmdnetworkBidAdapter.js | 2 +-
modules/huddledmassesBidAdapter.js | 132 --
modules/iasBidAdapter.js | 2 +-
modules/imonomyBidAdapter.js | 4 +-
modules/innityBidAdapter.js | 54 -
modules/inskinBidAdapter.js | 246 ---
modules/interactiveOffersBidAdapter.js | 99 --
modules/invibesBidAdapter.js | 4 +-
modules/iqmBidAdapter.js | 137 --
modules/jcmBidAdapter.js | 6 +-
modules/komoonaBidAdapter.js | 4 +-
modules/kummaBidAdapter.js | 308 ----
modules/lemmaBidAdapter.js | 401 -----
modules/lifestreetBidAdapter.js | 159 --
modules/livewrappedAnalyticsAdapter.js | 2 +-
modules/livewrappedBidAdapter.js | 235 ---
modules/marsmediaAnalyticsAdapter.js | 2 +-
modules/marsmediaBidAdapter.js | 2 +-
modules/meazyBidAdapter.js | 4 +-
modules/my6senseBidAdapter.js | 2 +-
modules/mytargetBidAdapter.js | 2 +-
modules/nasmediaAdmixerBidAdapter.js | 82 -
modules/nobidBidAdapter.js | 2 +-
modules/oneplanetonlyBidAdapter.js | 76 -
modules/open8BidAdapter.js | 2 +-
modules/openxAnalyticsAdapter.js | 2 +-
modules/optimaticBidAdapter.js | 106 --
modules/orbitsoftBidAdapter.js | 147 --
modules/padsquadBidAdapter.js | 2 +-
modules/papyrusBidAdapter.js | 2 +-
modules/peak226BidAdapter.js | 97 --
modules/piximediaBidAdapter.js | 2 +-
modules/platformioBidAdapter.js | 314 ----
modules/playgroundxyzBidAdapter.js | 172 --
modules/polluxBidAdapter.js | 120 --
modules/polymorphBidAdapter.js | 131 --
modules/prebidServerBidAdapter/index.js | 195 +--
modules/projectLimeLightBidAdapter.js | 2 +-
modules/{userId => }/pubCommonIdSystem.js | 11 +-
modules/pubnxBidAdapter.js | 86 -
modules/quantumBidAdapter.js | 8 +-
modules/rdnBidAdapter.js | 81 -
modules/readpeakBidAdapter.js | 256 ---
modules/realvuAnalyticsAdapter.js | 4 +-
modules/reklamstoreBidAdapter.js | 2 +-
modules/reloadBidAdapter.js | 10 +-
modules/rexrtbBidAdapter.js | 138 --
modules/rhythmoneBidAdapter.js | 2 +-
modules/rockyouBidAdapter.js | 370 -----
modules/roxotAnalyticsAdapter.js | 4 +-
modules/rtbdemandBidAdapter.js | 4 +-
modules/rtbdemandadkBidAdapter.js | 187 ---
modules/rubiconAnalyticsAdapter.js | 483 ------
modules/saraBidAdapter.js | 141 --
modules/sekindoUMBidAdapter.js | 2 +-
modules/serverbidBidAdapter.js | 234 ---
modules/serverbidServerBidAdapter.js | 233 ---
modules/sharethroughAnalyticsAdapter.js | 2 +-
modules/sharethroughBidAdapter.js | 6 +-
modules/slimcutBidAdapter.js | 4 +-
modules/smartadserverBidAdapter.js | 153 --
modules/smartrtbBidAdapter.js | 2 +-
modules/smartyadsBidAdapter.js | 91 --
modules/somoBidAdapter.js | 260 ----
modules/sortableBidAdapter.js | 162 --
modules/sovrnAnalyticsAdapter.js | 280 ----
modules/spotxBidAdapter.js | 6 +-
modules/staqAnalyticsAdapter.js | 2 +-
modules/supply2BidAdapter.js | 166 --
modules/synacormediaBidAdapter.js | 4 +-
modules/teadsBidAdapter.js | 4 +-
modules/telariaBidAdapter.js | 8 +-
modules/theAdxBidAdapter.js | 2 +-
modules/timBidAdapter.js | 2 +-
modules/trafficrootsBidAdapter.js | 129 --
modules/trionBidAdapter.js | 163 --
modules/trustxBidAdapter.js | 6 +-
modules/turktelekomBidAdapter.js | 6 +-
modules/ucfunnelBidAdapter.js | 237 ---
modules/undertoneBidAdapter.js | 8 +-
modules/{userId => }/unifiedIdSystem.js | 11 +-
modules/uolBidAdapter.js | 192 ---
modules/userId/index.js | 6 -
modules/vertamediaBidAdapter.js | 199 ---
modules/vertozBidAdapter.js | 86 -
modules/vidazooBidAdapter.js | 4 +-
modules/videoreachBidAdapter.js | 97 --
modules/visxBidAdapter.js | 4 +-
modules/vubleAnalyticsAdapter.js | 258 ---
modules/weboramaBidAdapter.js | 117 --
modules/widespaceBidAdapter.js | 250 ---
modules/xendizBidAdapter.js | 102 --
modules/xhbBidAdapter.js | 4 +-
modules/yieldbotBidAdapter.js | 604 -------
modules/yieldmoBidAdapter.js | 336 ----
modules/yieldnexusBidAdapter.js | 232 ---
modules/yieldoneBidAdapter.js | 176 ---
modules/yuktamediaAnalyticsAdapter.js | 144 --
modules/zedoBidAdapter.js | 325 ----
src/Renderer.js | 9 +-
src/adapters/bidderFactory.js | 4 +-
src/adloader.js | 96 +-
src/auctionManager.js | 1 +
src/cpmBucketManager.js | 18 +-
src/prebid.js | 76 +-
src/targeting.js | 4 +-
src/userSync.js | 22 +-
src/utils.js | 78 +-
test/mocks/adloaderStub.js | 10 +-
test/spec/AnalyticsAdapter_spec.js | 2 +-
test/spec/adloader_spec.js | 11 +
test/spec/config_spec.js | 2 -
test/spec/cpmBucketManager_spec.js | 16 +-
test/spec/modules/33acrossBidAdapter_spec.js | 4 +-
test/spec/modules/7xbidBidAdapter_spec.js | 161 --
test/spec/modules/a4gBidAdapter_spec.js | 149 --
test/spec/modules/aardvarkBidAdapter_spec.js | 24 +-
test/spec/modules/adbutlerBidAdapter_spec.js | 211 ---
test/spec/modules/adformBidAdapter_spec.js | 2 +-
.../modules/adformOpenRTBBidAdapter_spec.js | 2 +-
.../modules/adgenerationBidAdapter_spec.js | 12 +-
.../adkernelAdnAnalyticsAdapter_spec.js | 268 ----
.../modules/adkernelAdnBidAdapter_spec.js | 8 +-
test/spec/modules/adkernelBidAdapter_spec.js | 12 +-
test/spec/modules/admanBidAdapter_spec.js | 215 ---
test/spec/modules/admediaBidAdapter_spec.js | 4 +-
test/spec/modules/admixerBidAdapter_spec.js | 117 --
test/spec/modules/adpod_spec.js | 3 -
test/spec/modules/adponeBidAdapter_spec.js | 8 +-
test/spec/modules/adspiritBidAdapter_spec.js | 142 --
.../modules/adtelligentBidAdapter_spec.js | 311 ----
test/spec/modules/aduptechBidAdapter_spec.js | 261 ----
test/spec/modules/advenueBidAdapter_spec.js | 2 +-
test/spec/modules/adyoulikeBidAdapter_spec.js | 2 +-
test/spec/modules/ajaBidAdapter_spec.js | 10 +-
test/spec/modules/andbeyondBidAdapter_spec.js | 208 ---
test/spec/modules/aniviewBidAdapter_spec.js | 183 ---
test/spec/modules/aolBidAdapter_spec.js | 10 +-
test/spec/modules/appnexusBidAdapter_spec.js | 46 +-
test/spec/modules/arteebeeBidAdapter_spec.js | 156 --
test/spec/modules/atomxBidAdapter_spec.js | 4 +-
.../modules/audienceNetworkBidAdapter_spec.js | 522 -------
.../spec/modules/bidphysicsBidAdapter_spec.js | 4 +-
test/spec/modules/bizzclickBidAdapter_spec.js | 117 --
test/spec/modules/brainyBidAdapter_spec.js | 128 --
.../spec/modules/bridgewellBidAdapter_spec.js | 1164 --------------
test/spec/modules/bucksenseBidAdapter_spec.js | 6 +-
test/spec/modules/c1xBidAdapter_spec.js | 4 +-
test/spec/modules/ccxBidAdapter_spec.js | 403 -----
test/spec/modules/cedatoBidAdapter_spec.js | 2 +-
.../modules/cleanmedianetBidAdapter_spec.js | 603 -------
test/spec/modules/coinzillaBidAdapter_spec.js | 4 +-
.../modules/collectcentBidAdapter_spec.js | 4 +-
test/spec/modules/colombiaBidAdapter_spec.js | 152 --
.../modules/contentigniteBidAdapter_spec.js | 186 ---
test/spec/modules/cosmosBidAdapter_spec.js | 4 +-
test/spec/modules/cpmstarBidAdapter_spec.js | 6 +-
test/spec/modules/danmarketBidAdapter_spec.js | 309 ----
.../spec/modules/datablocksBidAdapter_spec.js | 18 +-
.../modules/decenteradsBidAdapter_spec.js | 207 ---
test/spec/modules/dgadsBidAdapter_spec.js | 299 ----
test/spec/modules/dspxBidAdapter_spec.js | 130 --
test/spec/modules/ebdrBidAdapter_spec.js | 10 +-
test/spec/modules/emoteevBidAdapter_spec.js | 4 +-
.../modules/emx_digitalBidAdapter_spec.js | 558 -------
test/spec/modules/eplanningBidAdapter_spec.js | 724 ---------
test/spec/modules/etargetBidAdapter_spec.js | 2 +-
test/spec/modules/eywamediaBidAdapter_spec.js | 253 ---
test/spec/modules/fairtradeBidAdapter_spec.js | 289 ----
test/spec/modules/fidelityBidAdapter_spec.js | 180 ---
.../modules/freewheel-sspBidAdapter_spec.js | 239 ---
test/spec/modules/fyberBidAdapter_spec.js | 154 --
test/spec/modules/gammaBidAdapter_spec.js | 105 --
test/spec/modules/gamoshiBidAdapter_spec.js | 543 -------
test/spec/modules/getintentBidAdapter_spec.js | 8 +-
test/spec/modules/giantsBidAdapter_spec.js | 301 ----
test/spec/modules/gjirafaBidAdapter_spec.js | 172 --
test/spec/modules/gridBidAdapter_spec.js | 2 +-
test/spec/modules/gxoneBidAdapter_spec.js | 293 ----
.../modules/hpmdnetworkBidAdapter_spec.js | 10 +-
.../modules/huddledmassesBidAdapter_spec.js | 119 --
test/spec/modules/iasBidAdapter_spec.js | 2 +-
test/spec/modules/imonomyBidAdapter_spec.js | 6 +-
.../modules/improvedigitalBidAdapter_spec.js | 70 +-
test/spec/modules/innityBidAdapter_spec.js | 100 --
test/spec/modules/inskinBidAdapter_spec.js | 288 ----
.../interactiveOffersBidAdapter_spec.js | 177 ---
test/spec/modules/invibesBidAdapter_spec.js | 4 +-
test/spec/modules/iqmBidAdapter_spec.js | 219 ---
test/spec/modules/ixBidAdapter_spec.js | 18 +-
test/spec/modules/jcmBidAdapter_spec.js | 6 +-
test/spec/modules/komoonaBidAdapter_spec.js | 6 +-
test/spec/modules/kummaBidAdapter_spec.js | 335 ----
test/spec/modules/lemmaBidAdapter_spec.js | 335 ----
.../spec/modules/lifestreetBidAdapter_spec.js | 222 ---
.../livewrappedAnalyticsAdapter_spec.js | 2 +-
.../modules/livewrappedBidAdapter_spec.js | 835 ----------
test/spec/modules/lkqdBidAdapter_spec.js | 28 +-
test/spec/modules/logicadBidAdapter_spec.js | 2 +-
.../spec/modules/madvertiseBidAdapter_spec.js | 4 +-
test/spec/modules/mantisBidAdapter_spec.js | 4 +-
test/spec/modules/meazyBidAdapter_spec.js | 8 +-
test/spec/modules/mgidBidAdapter_spec.js | 26 +-
test/spec/modules/microadBidAdapter_spec.js | 10 +-
test/spec/modules/mobfoxBidAdapter_spec.js | 4 +-
test/spec/modules/mytargetBidAdapter_spec.js | 2 +-
.../modules/nanointeractiveBidAdapter_spec.js | 4 +-
.../modules/nasmediaAdmixerBidAdapter_spec.js | 138 --
.../modules/oneplanetonlyBidAdapter_spec.js | 100 --
test/spec/modules/open8BidAdapter_spec.js | 22 +-
.../modules/openxAnalyticsAdapter_spec.js | 2 +-
test/spec/modules/optimaticBidAdapter_spec.js | 178 ---
test/spec/modules/orbidderBidAdapter_spec.js | 4 +-
test/spec/modules/orbitsoftBidAdapter_spec.js | 248 ---
test/spec/modules/ozoneBidAdapter_spec.js | 8 +-
test/spec/modules/padsquadBidAdapter_spec.js | 4 +-
test/spec/modules/papyrusBidAdapter_spec.js | 2 +-
test/spec/modules/peak226BidAdapter_spec.js | 114 --
.../spec/modules/platformioBidAdapter_spec.js | 335 ----
.../modules/playgroundxyzBidAdapter_spec.js | 213 ---
test/spec/modules/polluxBidAdapter_spec.js | 207 ---
test/spec/modules/polymorphBidAdapter_spec.js | 219 ---
.../modules/prebidServerBidAdapter_spec.js | 269 +---
.../projectLimeLightBidAdapter_spec.js | 2 +-
test/spec/modules/pubnxBidAdapter_spec.js | 112 --
.../spec/modules/pulsepointBidAdapter_spec.js | 26 +-
test/spec/modules/quantumBidAdapter_spec.js | 32 +-
test/spec/modules/rdnBidAdapter_spec.js | 156 --
test/spec/modules/readpeakBidAdapter_spec.js | 207 ---
.../modules/reklamstoreBidAdapter_spec.js | 10 +-
test/spec/modules/rexrtbBidAdapter_spec.js | 107 --
test/spec/modules/rhythmoneBidAdapter_spec.js | 12 +-
.../modules/richaudienceBidAdapter_spec.js | 35 +-
test/spec/modules/rockyouBidAdapter_spec.js | 494 ------
.../modules/roxotAnalyticsAdapter_spec.js | 14 +-
test/spec/modules/rtbdemandBidAdapter_spec.js | 4 +-
.../modules/rtbdemandadkBidAdapter_spec.js | 268 ----
test/spec/modules/rtbhouseBidAdapter_spec.js | 16 +-
.../modules/rubiconAnalyticsAdapter_spec.js | 814 ----------
test/spec/modules/rubiconBidAdapter_spec.js | 18 +-
test/spec/modules/saraBidAdapter_spec.js | 293 ----
test/spec/modules/sekindoUMBidAdapter_spec.js | 4 +-
test/spec/modules/serverbidBidAdapter_spec.js | 253 ---
.../modules/serverbidServerBidAdapter_spec.js | 303 ----
.../modules/sharethroughBidAdapter_spec.js | 14 +-
.../modules/showheroes-bsBidAdapter_spec.js | 2 +-
test/spec/modules/slimcutBidAdapter_spec.js | 10 +-
.../modules/smartadserverBidAdapter_spec.js | 399 -----
test/spec/modules/smartrtbBidAdapter_spec.js | 8 +-
test/spec/modules/smartyadsBidAdapter_spec.js | 230 ---
.../modules/smilewantedBidAdapter_spec.js | 4 +-
test/spec/modules/somoBidAdapter_spec.js | 481 ------
test/spec/modules/sonobiBidAdapter_spec.js | 24 +-
test/spec/modules/sortableBidAdapter_spec.js | 258 ---
.../modules/sovrnAnalyticsAdapter_spec.js | 546 -------
test/spec/modules/spotxBidAdapter_spec.js | 14 +-
.../spec/modules/staqAnalyticsAdapter_spec.js | 12 +-
test/spec/modules/supply2BidAdapter_spec.js | 332 ----
.../modules/synacormediaBidAdapter_spec.js | 30 +-
test/spec/modules/teadsBidAdapter_spec.js | 12 +-
test/spec/modules/theAdxBidAdapter_spec.js | 14 +-
test/spec/modules/timBidAdapter_spec.js | 4 +-
test/spec/modules/topRTBBidAdapter_spec.js | 2 +-
.../modules/trafficrootsBidAdapter_spec.js | 149 --
test/spec/modules/trionBidAdapter_spec.js | 274 ----
.../spec/modules/tripleliftBidAdapter_spec.js | 6 +-
test/spec/modules/trustxBidAdapter_spec.js | 6 +-
.../modules/turktelekomBidAdapter_spec.js | 6 +-
test/spec/modules/ucfunnelBidAdapter_spec.js | 243 ---
test/spec/modules/undertoneBidAdapter_spec.js | 20 +-
test/spec/modules/unrulyBidAdapter_spec.js | 4 +-
test/spec/modules/uolBidAdapter_spec.js | 308 ----
test/spec/modules/userId_spec.js | 4 +-
.../spec/modules/vertamediaBidAdapter_spec.js | 218 ---
test/spec/modules/vertozBidAdapter_spec.js | 112 --
test/spec/modules/vidazooBidAdapter_spec.js | 6 +-
test/spec/modules/videoNowBidAdapter_spec.js | 32 +-
.../spec/modules/videoreachBidAdapter_spec.js | 141 --
test/spec/modules/visxBidAdapter_spec.js | 2 +-
.../modules/vubleAnalyticsAdapter_spec.js | 122 --
test/spec/modules/weboramaBidAdapter_spec.js | 118 --
test/spec/modules/widespaceBidAdapter_spec.js | 262 ----
test/spec/modules/xendizBidAdapter_spec.js | 119 --
test/spec/modules/xhbBidAdapter_spec.js | 16 +-
test/spec/modules/yieldbotBidAdapter_spec.js | 1383 -----------------
test/spec/modules/yieldmoBidAdapter_spec.js | 220 ---
.../spec/modules/yieldnexusBidAdapter_spec.js | 418 -----
test/spec/modules/yieldoneBidAdapter_spec.js | 236 ---
.../yuktamediaAnalyticsAdaptor_spec.js | 177 ---
test/spec/modules/zedoBidAdapter_spec.js | 354 -----
test/spec/renderer_spec.js | 18 +
test/spec/unit/pbjs_api_spec.js | 91 +-
test/spec/userSync_spec.js | 82 +-
test/spec/utils_spec.js | 87 --
360 files changed, 918 insertions(+), 42964 deletions(-)
delete mode 100644 modules/7xbidBidAdapter.js
delete mode 100644 modules/a4gBidAdapter.js
delete mode 100644 modules/adbutlerBidAdapter.js
delete mode 100644 modules/adkernelAdnAnalyticsAdapter.js
delete mode 100644 modules/admanBidAdapter.js
delete mode 100644 modules/admixerBidAdapter.js
delete mode 100644 modules/adspiritBidAdapter.js
delete mode 100644 modules/adtelligentBidAdapter.js
delete mode 100644 modules/aduptechBidAdapter.js
delete mode 100644 modules/andbeyondBidAdapter.js
delete mode 100644 modules/aniviewBidAdapter.js
delete mode 100644 modules/arteebeeBidAdapter.js
delete mode 100644 modules/audienceNetworkBidAdapter.js
delete mode 100644 modules/bizzclickBidAdapter.js
delete mode 100644 modules/brainyBidAdapter.js
delete mode 100644 modules/bridgewellBidAdapter.js
delete mode 100644 modules/ccxBidAdapter.js
delete mode 100644 modules/cleanmedianetBidAdapter.js
delete mode 100644 modules/colombiaBidAdapter.js
delete mode 100644 modules/contentigniteBidAdapter.js
delete mode 100644 modules/danmarketBidAdapter.js
delete mode 100644 modules/decenteradsBidAdapter.js
delete mode 100644 modules/dgadsBidAdapter.js
delete mode 100644 modules/dspxBidAdapter.js
delete mode 100644 modules/emx_digitalBidAdapter.js
delete mode 100644 modules/eplanningBidAdapter.js
delete mode 100644 modules/eywamediaBidAdapter.js
delete mode 100644 modules/fairtradeBidAdapter.js
delete mode 100644 modules/fidelityBidAdapter.js
delete mode 100644 modules/freewheel-sspBidAdapter.js
delete mode 100644 modules/fyberBidAdapter.js
delete mode 100644 modules/gammaBidAdapter.js
delete mode 100644 modules/gamoshiBidAdapter.js
delete mode 100644 modules/giantsBidAdapter.js
delete mode 100644 modules/gjirafaBidAdapter.js
delete mode 100644 modules/gxoneBidAdapter.js
delete mode 100644 modules/huddledmassesBidAdapter.js
delete mode 100644 modules/innityBidAdapter.js
delete mode 100644 modules/inskinBidAdapter.js
delete mode 100644 modules/interactiveOffersBidAdapter.js
delete mode 100644 modules/iqmBidAdapter.js
delete mode 100644 modules/kummaBidAdapter.js
delete mode 100644 modules/lemmaBidAdapter.js
delete mode 100644 modules/lifestreetBidAdapter.js
delete mode 100644 modules/livewrappedBidAdapter.js
delete mode 100644 modules/nasmediaAdmixerBidAdapter.js
delete mode 100644 modules/oneplanetonlyBidAdapter.js
delete mode 100644 modules/optimaticBidAdapter.js
delete mode 100644 modules/orbitsoftBidAdapter.js
delete mode 100644 modules/peak226BidAdapter.js
delete mode 100644 modules/platformioBidAdapter.js
delete mode 100644 modules/playgroundxyzBidAdapter.js
delete mode 100644 modules/polluxBidAdapter.js
delete mode 100644 modules/polymorphBidAdapter.js
rename modules/{userId => }/pubCommonIdSystem.js (91%)
delete mode 100644 modules/pubnxBidAdapter.js
delete mode 100644 modules/rdnBidAdapter.js
delete mode 100644 modules/readpeakBidAdapter.js
delete mode 100644 modules/rexrtbBidAdapter.js
delete mode 100644 modules/rockyouBidAdapter.js
delete mode 100644 modules/rtbdemandadkBidAdapter.js
delete mode 100644 modules/rubiconAnalyticsAdapter.js
delete mode 100644 modules/saraBidAdapter.js
delete mode 100644 modules/serverbidBidAdapter.js
delete mode 100644 modules/serverbidServerBidAdapter.js
delete mode 100644 modules/smartadserverBidAdapter.js
delete mode 100644 modules/smartyadsBidAdapter.js
delete mode 100644 modules/somoBidAdapter.js
delete mode 100644 modules/sortableBidAdapter.js
delete mode 100644 modules/sovrnAnalyticsAdapter.js
delete mode 100644 modules/supply2BidAdapter.js
delete mode 100644 modules/trafficrootsBidAdapter.js
delete mode 100644 modules/trionBidAdapter.js
delete mode 100644 modules/ucfunnelBidAdapter.js
rename modules/{userId => }/unifiedIdSystem.js (88%)
delete mode 100644 modules/uolBidAdapter.js
delete mode 100644 modules/vertamediaBidAdapter.js
delete mode 100644 modules/vertozBidAdapter.js
delete mode 100644 modules/videoreachBidAdapter.js
delete mode 100644 modules/vubleAnalyticsAdapter.js
delete mode 100644 modules/weboramaBidAdapter.js
delete mode 100644 modules/widespaceBidAdapter.js
delete mode 100644 modules/xendizBidAdapter.js
delete mode 100644 modules/yieldbotBidAdapter.js
delete mode 100644 modules/yieldmoBidAdapter.js
delete mode 100644 modules/yieldnexusBidAdapter.js
delete mode 100644 modules/yieldoneBidAdapter.js
delete mode 100644 modules/yuktamediaAnalyticsAdapter.js
delete mode 100644 modules/zedoBidAdapter.js
delete mode 100644 test/spec/modules/7xbidBidAdapter_spec.js
delete mode 100644 test/spec/modules/a4gBidAdapter_spec.js
delete mode 100644 test/spec/modules/adbutlerBidAdapter_spec.js
delete mode 100644 test/spec/modules/adkernelAdnAnalyticsAdapter_spec.js
delete mode 100644 test/spec/modules/admanBidAdapter_spec.js
delete mode 100644 test/spec/modules/admixerBidAdapter_spec.js
delete mode 100644 test/spec/modules/adspiritBidAdapter_spec.js
delete mode 100644 test/spec/modules/adtelligentBidAdapter_spec.js
delete mode 100644 test/spec/modules/aduptechBidAdapter_spec.js
delete mode 100644 test/spec/modules/andbeyondBidAdapter_spec.js
delete mode 100644 test/spec/modules/aniviewBidAdapter_spec.js
delete mode 100644 test/spec/modules/arteebeeBidAdapter_spec.js
delete mode 100644 test/spec/modules/audienceNetworkBidAdapter_spec.js
delete mode 100644 test/spec/modules/bizzclickBidAdapter_spec.js
delete mode 100644 test/spec/modules/brainyBidAdapter_spec.js
delete mode 100644 test/spec/modules/bridgewellBidAdapter_spec.js
delete mode 100644 test/spec/modules/ccxBidAdapter_spec.js
delete mode 100644 test/spec/modules/cleanmedianetBidAdapter_spec.js
delete mode 100644 test/spec/modules/colombiaBidAdapter_spec.js
delete mode 100644 test/spec/modules/contentigniteBidAdapter_spec.js
delete mode 100644 test/spec/modules/danmarketBidAdapter_spec.js
delete mode 100644 test/spec/modules/decenteradsBidAdapter_spec.js
delete mode 100644 test/spec/modules/dgadsBidAdapter_spec.js
delete mode 100644 test/spec/modules/dspxBidAdapter_spec.js
delete mode 100644 test/spec/modules/emx_digitalBidAdapter_spec.js
delete mode 100644 test/spec/modules/eplanningBidAdapter_spec.js
delete mode 100644 test/spec/modules/eywamediaBidAdapter_spec.js
delete mode 100644 test/spec/modules/fairtradeBidAdapter_spec.js
delete mode 100644 test/spec/modules/fidelityBidAdapter_spec.js
delete mode 100644 test/spec/modules/freewheel-sspBidAdapter_spec.js
delete mode 100644 test/spec/modules/fyberBidAdapter_spec.js
delete mode 100644 test/spec/modules/gammaBidAdapter_spec.js
delete mode 100644 test/spec/modules/gamoshiBidAdapter_spec.js
delete mode 100644 test/spec/modules/giantsBidAdapter_spec.js
delete mode 100644 test/spec/modules/gjirafaBidAdapter_spec.js
delete mode 100644 test/spec/modules/gxoneBidAdapter_spec.js
delete mode 100644 test/spec/modules/huddledmassesBidAdapter_spec.js
delete mode 100644 test/spec/modules/innityBidAdapter_spec.js
delete mode 100644 test/spec/modules/inskinBidAdapter_spec.js
delete mode 100644 test/spec/modules/interactiveOffersBidAdapter_spec.js
delete mode 100644 test/spec/modules/iqmBidAdapter_spec.js
delete mode 100644 test/spec/modules/kummaBidAdapter_spec.js
delete mode 100644 test/spec/modules/lemmaBidAdapter_spec.js
delete mode 100644 test/spec/modules/lifestreetBidAdapter_spec.js
delete mode 100644 test/spec/modules/livewrappedBidAdapter_spec.js
delete mode 100644 test/spec/modules/nasmediaAdmixerBidAdapter_spec.js
delete mode 100644 test/spec/modules/oneplanetonlyBidAdapter_spec.js
delete mode 100644 test/spec/modules/optimaticBidAdapter_spec.js
delete mode 100644 test/spec/modules/orbitsoftBidAdapter_spec.js
delete mode 100644 test/spec/modules/peak226BidAdapter_spec.js
delete mode 100644 test/spec/modules/platformioBidAdapter_spec.js
delete mode 100644 test/spec/modules/playgroundxyzBidAdapter_spec.js
delete mode 100644 test/spec/modules/polluxBidAdapter_spec.js
delete mode 100644 test/spec/modules/polymorphBidAdapter_spec.js
delete mode 100644 test/spec/modules/pubnxBidAdapter_spec.js
delete mode 100644 test/spec/modules/rdnBidAdapter_spec.js
delete mode 100644 test/spec/modules/readpeakBidAdapter_spec.js
delete mode 100644 test/spec/modules/rexrtbBidAdapter_spec.js
delete mode 100644 test/spec/modules/rockyouBidAdapter_spec.js
delete mode 100644 test/spec/modules/rtbdemandadkBidAdapter_spec.js
delete mode 100644 test/spec/modules/rubiconAnalyticsAdapter_spec.js
delete mode 100644 test/spec/modules/saraBidAdapter_spec.js
delete mode 100644 test/spec/modules/serverbidBidAdapter_spec.js
delete mode 100644 test/spec/modules/serverbidServerBidAdapter_spec.js
delete mode 100644 test/spec/modules/smartadserverBidAdapter_spec.js
delete mode 100644 test/spec/modules/smartyadsBidAdapter_spec.js
delete mode 100644 test/spec/modules/somoBidAdapter_spec.js
delete mode 100644 test/spec/modules/sortableBidAdapter_spec.js
delete mode 100644 test/spec/modules/sovrnAnalyticsAdapter_spec.js
delete mode 100644 test/spec/modules/supply2BidAdapter_spec.js
delete mode 100644 test/spec/modules/trafficrootsBidAdapter_spec.js
delete mode 100644 test/spec/modules/trionBidAdapter_spec.js
delete mode 100644 test/spec/modules/ucfunnelBidAdapter_spec.js
delete mode 100644 test/spec/modules/uolBidAdapter_spec.js
delete mode 100644 test/spec/modules/vertamediaBidAdapter_spec.js
delete mode 100644 test/spec/modules/vertozBidAdapter_spec.js
delete mode 100644 test/spec/modules/videoreachBidAdapter_spec.js
delete mode 100644 test/spec/modules/vubleAnalyticsAdapter_spec.js
delete mode 100644 test/spec/modules/weboramaBidAdapter_spec.js
delete mode 100644 test/spec/modules/widespaceBidAdapter_spec.js
delete mode 100644 test/spec/modules/xendizBidAdapter_spec.js
delete mode 100644 test/spec/modules/yieldbotBidAdapter_spec.js
delete mode 100644 test/spec/modules/yieldmoBidAdapter_spec.js
delete mode 100644 test/spec/modules/yieldnexusBidAdapter_spec.js
delete mode 100644 test/spec/modules/yieldoneBidAdapter_spec.js
delete mode 100644 test/spec/modules/yuktamediaAnalyticsAdaptor_spec.js
delete mode 100644 test/spec/modules/zedoBidAdapter_spec.js
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9c00a2bf51a3..6188d6c2182a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -48,7 +48,7 @@ When you are adding code to Prebid.js, or modifying code that isn't covered by a
- _Assert_: check that the expected results have occurred
- e.g., use Chai assertions to check that the expected output is equal to the actual output
- Test the public interface, not the internal implementation
-- If you need to check `adloader.loadScript` in a test, use a `stub` rather than a `spy`. `spy`s trigger a network call which can result in a `script error` and cause unrelated unit tests to fail. `stub`s will let you gather information about the `adloader.loadScript` call without affecting external resources
+- If you need to check `adloader.loadExternalScript` in a test, use a `stub` rather than a `spy`. `spy`s trigger a network call which can result in a `script error` and cause unrelated unit tests to fail. `stub`s will let you gather information about the `adloader.loadExternalScript` call without affecting external resources
- When writing tests you may use ES2015 syntax if desired
### Test Examples
diff --git a/integrationExamples/gpt/prebidServer_example.html b/integrationExamples/gpt/prebidServer_example.html
index db61a6a46d6b..7761178efa89 100644
--- a/integrationExamples/gpt/prebidServer_example.html
+++ b/integrationExamples/gpt/prebidServer_example.html
@@ -36,7 +36,11 @@
pbjs.que.push(function() {
var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
- sizes: [[300, 250]],
+ mediaTypes: {
+ banner: {
+ sizes: [[300, 250]]
+ }
+ },
bids: [
{
bidder: 'appnexus',
diff --git a/modules/.submodules.json b/modules/.submodules.json
index 0841f5e9777f..3572dc2e303b 100644
--- a/modules/.submodules.json
+++ b/modules/.submodules.json
@@ -1,5 +1,7 @@
{
"userId": [
+ "unifiedIdSystem",
+ "pubCommonIdSystem",
"digiTrustIdSystem",
"id5IdSystem",
"criteortusIdSystem",
diff --git a/modules/7xbidBidAdapter.js b/modules/7xbidBidAdapter.js
deleted file mode 100644
index 5464f87ee994..000000000000
--- a/modules/7xbidBidAdapter.js
+++ /dev/null
@@ -1,155 +0,0 @@
-import * as utils from '../src/utils';
-import { registerBidder } from '../src/adapters/bidderFactory';
-
-const BIDDER_CODE = '7xbid';
-const BIDDER_ALIAS = '7xb';
-const ENDPOINT_BANNER = '//bidder.7xbid.com/api/v1/prebid/banner';
-const ENDPOINT_NATIVE = '//bidder.7xbid.com/api/v1/prebid/native';
-const COOKIE_SYNC_URL = '//bidder.7xbid.com/api/v1/cookie/gen';
-const SUPPORTED_MEDIA_TYPES = ['banner', 'native'];
-const SUPPORTED_CURRENCIES = ['USD', 'JPY'];
-const DEFAULT_CURRENCY = 'JPY';
-const NET_REVENUE = true;
-
-const _encodeURIComponent = function(a) {
- let b = window.encodeURIComponent(a);
- b = b.replace(/'/g, '%27');
- return b;
-}
-
-export const _getUrlVars = function(url) {
- var hash;
- var myJson = {};
- var hashes = url.slice(url.indexOf('?') + 1).split('&');
- for (var i = 0; i < hashes.length; i++) {
- hash = hashes[i].split('=');
- myJson[hash[0]] = hash[1];
- }
- return myJson;
-}
-
-export const spec = {
- code: BIDDER_CODE,
- aliases: [BIDDER_ALIAS], // short code
- supportedMediaTypes: SUPPORTED_MEDIA_TYPES,
- isBidRequestValid: function(bid) {
- if (!(bid.params.placementId)) {
- return false;
- }
-
- if (bid.params.hasOwnProperty('currency') &&
- SUPPORTED_CURRENCIES.indexOf(bid.params.currency) === -1) {
- utils.logInfo('Invalid currency type, we support only JPY and USD!')
- return false;
- }
-
- return true;
- },
- /**
- * Make a server request from the list of BidRequests.
- *
- * @param {validBidRequests[]} - an array of bids
- * @return ServerRequest Info describing the request to the server.
- */
- buildRequests: function(validBidRequests, bidderRequest) {
- let serverRequests = [];
- var refererInfo;
- if (bidderRequest && bidderRequest.refererInfo) {
- refererInfo = bidderRequest.refererInfo;
- }
- validBidRequests.forEach((bid, i) => {
- let endpoint = ENDPOINT_BANNER
- let data = {
- 'placementid': bid.params.placementId,
- 'cur': bid.params.hasOwnProperty('currency') ? bid.params.currency : DEFAULT_CURRENCY,
- 'ua': navigator.userAgent,
- 'loc': utils.getTopWindowUrl(),
- 'topframe': (window.parent === window.self) ? 1 : 0,
- 'sw': screen && screen.width,
- 'sh': screen && screen.height,
- 'cb': Math.floor(Math.random() * 99999999999),
- 'tpaf': 1,
- 'cks': 1,
- 'requestid': bid.bidId
- };
-
- if (bid.hasOwnProperty('nativeParams')) {
- endpoint = ENDPOINT_NATIVE
- data.tkf = 1 // return url tracker
- data.ad_track = '1'
- data.apiv = '1.1.0'
- }
-
- if (refererInfo && refererInfo.referer) {
- data.referer = refererInfo.referer;
- } else {
- data.referer = '';
- }
-
- serverRequests.push({
- method: 'GET',
- url: endpoint,
- data: utils.parseQueryStringParameters(data)
- })
- })
-
- return serverRequests;
- },
- interpretResponse: function(serverResponse, request) {
- const data = _getUrlVars(request.data)
- const successBid = serverResponse.body || {};
- let bidResponses = [];
- if (successBid.hasOwnProperty(data.placementid)) {
- let bid = successBid[data.placementid]
- let bidResponse = {
- requestId: bid.requestid,
- cpm: bid.price,
- creativeId: bid.creativeId,
- currency: bid.cur,
- netRevenue: NET_REVENUE,
- ttl: 700
- };
-
- if (bid.hasOwnProperty('title')) { // it is native ad response
- bidResponse.mediaType = 'native'
- bidResponse.native = {
- title: bid.title,
- body: bid.description,
- cta: bid.cta,
- sponsoredBy: bid.advertiser,
- clickUrl: _encodeURIComponent(bid.landingURL),
- impressionTrackers: bid.trackings,
- }
- if (bid.screenshots) {
- bidResponse.native.image = {
- url: bid.screenshots.url,
- height: bid.screenshots.height,
- width: bid.screenshots.width,
- }
- }
- if (bid.icon) {
- bidResponse.native.icon = {
- url: bid.icon.url,
- height: bid.icon.height,
- width: bid.icon.width,
- }
- }
- } else {
- bidResponse.ad = bid.adm
- bidResponse.width = bid.width
- bidResponse.height = bid.height
- }
-
- bidResponses.push(bidResponse);
- }
-
- return bidResponses;
- },
- getUserSyncs: function(syncOptions, serverResponses) {
- return [{
- type: 'image',
- url: COOKIE_SYNC_URL
- }];
- }
-}
-registerBidder(spec);
diff --git a/modules/a4gBidAdapter.js b/modules/a4gBidAdapter.js
deleted file mode 100644
index d66630ce4db7..000000000000
--- a/modules/a4gBidAdapter.js
+++ /dev/null
@@ -1,89 +0,0 @@
-import {registerBidder} from '../src/adapters/bidderFactory';
-import * as utils from '../src/utils';
-
-const A4G_BIDDER_CODE = 'a4g';
-const A4G_CURRENCY = 'USD';
-const A4G_DEFAULT_BID_URL = '//ads.ad4game.com/v1/bid';
-const A4G_TTL = 120;
-
-const LOCATION_PARAM_NAME = 'siteurl';
-const ID_PARAM_NAME = 'id';
-const IFRAME_PARAM_NAME = 'if';
-const ZONE_ID_PARAM_NAME = 'zoneId';
-const SIZE_PARAM_NAME = 'size';
-
-const ARRAY_PARAM_SEPARATOR = ';';
-const ARRAY_SIZE_SEPARATOR = ',';
-const SIZE_SEPARATOR = 'x';
-
-export const spec = {
- code: A4G_BIDDER_CODE,
- isBidRequestValid: function(bid) {
- return bid.params && !!bid.params.zoneId;
- },
-
- buildRequests: function(validBidRequests, bidderRequest) {
- let deliveryUrl = '';
- const idParams = [];
- const sizeParams = [];
- const zoneIds = [];
-
- utils._each(validBidRequests, function(bid) {
- if (!deliveryUrl && typeof bid.params.deliveryUrl === 'string') {
- deliveryUrl = bid.params.deliveryUrl;
- }
- idParams.push(bid.bidId);
- sizeParams.push(bid.sizes.map(size => size.join(SIZE_SEPARATOR)).join(ARRAY_SIZE_SEPARATOR));
- zoneIds.push(bid.params.zoneId);
- });
-
- if (!deliveryUrl) {
- deliveryUrl = A4G_DEFAULT_BID_URL;
- }
-
- let data = {
- [IFRAME_PARAM_NAME]: 0,
- [LOCATION_PARAM_NAME]: utils.getTopWindowUrl(),
- [SIZE_PARAM_NAME]: sizeParams.join(ARRAY_PARAM_SEPARATOR),
- [ID_PARAM_NAME]: idParams.join(ARRAY_PARAM_SEPARATOR),
- [ZONE_ID_PARAM_NAME]: zoneIds.join(ARRAY_PARAM_SEPARATOR)
- };
-
- if (bidderRequest && bidderRequest.gdprConsent) {
- data.gdpr = {
- applies: bidderRequest.gdprConsent.gdprApplies,
- consent: bidderRequest.gdprConsent.consentString
- };
- }
-
- return {
- method: 'GET',
- url: deliveryUrl,
- data: data
- };
- },
-
- interpretResponse: function(serverResponses, request) {
- const bidResponses = [];
- utils._each(serverResponses.body, function(response) {
- if (response.cpm > 0) {
- const bidResponse = {
- requestId: response.id,
- creativeId: response.id,
- adId: response.id,
- cpm: response.cpm,
- width: response.width,
- height: response.height,
- currency: A4G_CURRENCY,
- netRevenue: true,
- ttl: A4G_TTL,
- ad: response.ad
- };
- bidResponses.push(bidResponse);
- }
- });
- return bidResponses;
- }
-};
-
-registerBidder(spec);
diff --git a/modules/aardvarkBidAdapter.js b/modules/aardvarkBidAdapter.js
index 9caaaaa747ca..c1bc281e0376 100644
--- a/modules/aardvarkBidAdapter.js
+++ b/modules/aardvarkBidAdapter.js
@@ -103,7 +103,7 @@ export const spec = {
var req = requestsMap[auctionId];
requests.push({
method: 'GET',
- url: `//${req.endpoint}/${auctionId}/${req.shortCodes.join('_')}/aardvark`,
+ url: `https://${req.endpoint}/${auctionId}/${req.shortCodes.join('_')}/aardvark`,
data: req.payload,
bidderRequest
});
@@ -162,7 +162,7 @@ export const spec = {
getUserSyncs: function(syncOptions, serverResponses, gdprConsent) {
const syncs = [];
- var url = '//' + SYNC_ENDPOINT + '/cs';
+ var url = 'https://' + SYNC_ENDPOINT + '/cs';
var gdprApplies = false;
if (gdprConsent && (typeof gdprConsent.gdprApplies === 'boolean')) {
gdprApplies = gdprConsent.gdprApplies;
diff --git a/modules/adbutlerBidAdapter.js b/modules/adbutlerBidAdapter.js
deleted file mode 100644
index 88aa4f158b79..000000000000
--- a/modules/adbutlerBidAdapter.js
+++ /dev/null
@@ -1,131 +0,0 @@
-'use strict';
-
-import * as utils from '../src/utils';
-import {config} from '../src/config';
-import {registerBidder} from '../src/adapters/bidderFactory';
-
-const BIDDER_CODE = 'adbutler';
-
-export const spec = {
- code: BIDDER_CODE,
- pageID: Math.floor(Math.random() * 10e6),
- aliases: ['divreach'],
-
- isBidRequestValid: function (bid) {
- return !!(bid.params.accountID && bid.params.zoneID);
- },
-
- buildRequests: function (validBidRequests) {
- var i;
- var zoneID;
- var bidRequest;
- var accountID;
- var keyword;
- var domain;
- var requestURI;
- var serverRequests = [];
- var zoneCounters = {};
-
- for (i = 0; i < validBidRequests.length; i++) {
- bidRequest = validBidRequests[i];
- zoneID = utils.getBidIdParameter('zoneID', bidRequest.params);
- accountID = utils.getBidIdParameter('accountID', bidRequest.params);
- keyword = utils.getBidIdParameter('keyword', bidRequest.params);
- domain = utils.getBidIdParameter('domain', bidRequest.params);
-
- if (!(zoneID in zoneCounters)) {
- zoneCounters[zoneID] = 0;
- }
-
- if (typeof domain === 'undefined' || domain.length === 0) {
- domain = 'servedbyadbutler.com';
- }
-
- requestURI = location.protocol + '//' + domain + '/adserve/;type=hbr;';
- requestURI += 'ID=' + encodeURIComponent(accountID) + ';';
- requestURI += 'setID=' + encodeURIComponent(zoneID) + ';';
- requestURI += 'pid=' + encodeURIComponent(spec.pageID) + ';';
- requestURI += 'place=' + encodeURIComponent(zoneCounters[zoneID]) + ';';
-
- // append the keyword for targeting if one was passed in
- if (keyword !== '') {
- requestURI += 'kw=' + encodeURIComponent(keyword) + ';';
- }
-
- zoneCounters[zoneID]++;
- serverRequests.push({
- method: 'GET',
- url: requestURI,
- data: {},
- bidRequest: bidRequest
- });
- }
- return serverRequests;
- },
-
- interpretResponse: function (serverResponse, bidRequest) {
- var bidObj = bidRequest.bidRequest;
- var bidResponses = [];
- var bidResponse = {};
- var isCorrectSize = false;
- var isCorrectCPM = true;
- var CPM;
- var minCPM;
- var maxCPM;
- var width;
- var height;
-
- serverResponse = serverResponse.body;
- if (serverResponse && serverResponse.status === 'SUCCESS' && bidObj) {
- CPM = serverResponse.cpm;
- minCPM = utils.getBidIdParameter('minCPM', bidObj.params);
- maxCPM = utils.getBidIdParameter('maxCPM', bidObj.params);
- width = parseInt(serverResponse.width);
- height = parseInt(serverResponse.height);
-
- // Ensure response CPM is within the given bounds
- if (minCPM !== '' && CPM < parseFloat(minCPM)) {
- isCorrectCPM = false;
- }
- if (maxCPM !== '' && CPM > parseFloat(maxCPM)) {
- isCorrectCPM = false;
- }
-
- // Ensure that response ad matches one of the placement sizes.
- utils._each(bidObj.sizes, function (size) {
- if (width === size[0] && height === size[1]) {
- isCorrectSize = true;
- }
- });
- if (isCorrectCPM && isCorrectSize) {
- bidResponse.requestId = bidObj.bidId;
- bidResponse.bidderCode = bidObj.bidder;
- bidResponse.creativeId = serverResponse.placement_id;
- bidResponse.cpm = CPM;
- bidResponse.width = width;
- bidResponse.height = height;
- bidResponse.ad = serverResponse.ad_code;
- bidResponse.ad += spec.addTrackingPixels(serverResponse.tracking_pixels);
- bidResponse.currency = 'USD';
- bidResponse.netRevenue = true;
- bidResponse.ttl = config.getConfig('_bidderTimeout');
- bidResponse.referrer = utils.getTopWindowUrl();
- bidResponses.push(bidResponse);
- }
- }
- return bidResponses;
- },
-
- addTrackingPixels: function (trackingPixels) {
- var trackingPixelMarkup = '';
- utils._each(trackingPixels, function (pixelURL) {
- var trackingPixel = '';
-
- trackingPixelMarkup += trackingPixel;
- });
- return trackingPixelMarkup;
- }
-};
-registerBidder(spec);
diff --git a/modules/adformBidAdapter.js b/modules/adformBidAdapter.js
index d344908c6384..7ffd79328b16 100644
--- a/modules/adformBidAdapter.js
+++ b/modules/adformBidAdapter.js
@@ -42,7 +42,7 @@ export const spec = {
request.push(formRequestUrl(reqParams));
}
- request.unshift('//' + globalParams[0][1] + '/adx/?rp=4');
+ request.unshift('https://' + globalParams[0][1] + '/adx/?rp=4');
netRevenue = netRevenue || 'gross';
request.push('pt=' + netRevenue);
request.push('stid=' + validBidRequests[0].auctionId);
diff --git a/modules/adformOpenRTBBidAdapter.js b/modules/adformOpenRTBBidAdapter.js
index 98e6de8036a2..a936c39d6250 100644
--- a/modules/adformOpenRTBBidAdapter.js
+++ b/modules/adformOpenRTBBidAdapter.js
@@ -129,7 +129,7 @@ export const spec = {
return {
method: 'POST',
- url: '//' + adxDomain + '/adx/openrtb',
+ url: 'https://' + adxDomain + '/adx/openrtb',
data: JSON.stringify(request),
options: {
contentType: 'application/json'
diff --git a/modules/adgenerationBidAdapter.js b/modules/adgenerationBidAdapter.js
index 77b6acbf0e02..0a8466ce4779 100644
--- a/modules/adgenerationBidAdapter.js
+++ b/modules/adgenerationBidAdapter.js
@@ -28,7 +28,7 @@ export const spec = {
let serverRequests = [];
for (let i = 0, len = validBidRequests.length; i < len; i++) {
const validReq = validBidRequests[i];
- const DEBUG_URL = 'http://api-test.scaleout.jp/adsv/v1';
+ const DEBUG_URL = 'https://api-test.scaleout.jp/adsv/v1';
const URL = 'https://d.socdm.com/adsv/v1';
const url = validReq.params.debug ? DEBUG_URL : URL;
let data = ``;
diff --git a/modules/adkernelAdnAnalyticsAdapter.js b/modules/adkernelAdnAnalyticsAdapter.js
deleted file mode 100644
index b72fc268ea33..000000000000
--- a/modules/adkernelAdnAnalyticsAdapter.js
+++ /dev/null
@@ -1,378 +0,0 @@
-import adapter from '../src/AnalyticsAdapter';
-import CONSTANTS from '../src/constants.json';
-import adapterManager from '../src/adapterManager';
-import {parse} from '../src/url';
-import * as utils from '../src/utils';
-import {ajax} from '../src/ajax';
-
-const ANALYTICS_VERSION = '1.0.0';
-const DEFAULT_QUEUE_TIMEOUT = 4000;
-const DEFAULT_HOST = 'tag.adkernel.com';
-
-const ADK_HB_EVENTS = {
- AUCTION_INIT: 'auctionInit',
- BID_REQUEST: 'bidRequested',
- BID_RESPONSE: 'bidResponse',
- BID_WON: 'bidWon',
- AUCTION_END: 'auctionEnd',
- TIMEOUT: 'adapterTimedOut'
-};
-
-function buildRequestTemplate(pubId) {
- const url = utils.getTopWindowUrl();
- const ref = utils.getTopWindowReferrer();
- const topLocation = utils.getTopWindowLocation();
-
- return {
- ver: ANALYTICS_VERSION,
- domain: topLocation.hostname,
- path: topLocation.pathname,
- accId: pubId,
- env: {
- screen: {
- w: window.screen.width,
- h: window.screen.height
- },
- lang: navigator.language
- },
- src: getUmtSource(url, ref)
- }
-}
-
-let analyticsAdapter = Object.assign(adapter({analyticsType: 'endpoint'}),
- {
- track({ eventType, args }) {
- if (!analyticsAdapter.context) {
- return;
- }
- let handler = null;
- switch (eventType) {
- case CONSTANTS.EVENTS.AUCTION_INIT:
- if (analyticsAdapter.context.queue) {
- analyticsAdapter.context.queue.init();
- }
- handler = trackAuctionInit;
- break;
- case CONSTANTS.EVENTS.BID_REQUESTED:
- handler = trackBidRequest;
- break;
- case CONSTANTS.EVENTS.BID_RESPONSE:
- handler = trackBidResponse;
- break;
- case CONSTANTS.EVENTS.BID_WON:
- handler = trackBidWon;
- break;
- case CONSTANTS.EVENTS.BID_TIMEOUT:
- handler = trackBidTimeout;
- break;
- case CONSTANTS.EVENTS.AUCTION_END:
- handler = trackAuctionEnd;
- break;
- }
- if (handler) {
- let events = handler(args);
- if (analyticsAdapter.context.queue) {
- analyticsAdapter.context.queue.push(events);
- }
- if (eventType === CONSTANTS.EVENTS.AUCTION_END) {
- sendAll();
- }
- }
- }
- });
-
-analyticsAdapter.context = {};
-
-analyticsAdapter.originEnableAnalytics = analyticsAdapter.enableAnalytics;
-
-analyticsAdapter.enableAnalytics = (config) => {
- if (!config.options.pubId) {
- utils.logError('PubId is not defined. Analytics won\'t work');
- return;
- }
- analyticsAdapter.context = {
- host: config.options.host || DEFAULT_HOST,
- pubId: config.options.pubId,
- requestTemplate: buildRequestTemplate(config.options.pubId),
- queue: new ExpiringQueue(sendAll, config.options.queueTimeout || DEFAULT_QUEUE_TIMEOUT)
- };
- analyticsAdapter.originEnableAnalytics(config);
-};
-
-adapterManager.registerAnalyticsAdapter({
- adapter: analyticsAdapter,
- code: 'adkernelAdn'
-});
-
-export default analyticsAdapter;
-
-function sendAll() {
- let events = analyticsAdapter.context.queue.popAll();
- if (events.length !== 0) {
- let req = Object.assign({}, analyticsAdapter.context.requestTemplate, {hb_ev: events});
- analyticsAdapter.ajaxCall(JSON.stringify(req));
- }
-}
-
-analyticsAdapter.ajaxCall = function ajaxCall(data) {
- ajax(`//${analyticsAdapter.context.host}/hb-analytics`, () => {
- }, data);
-};
-
-function trackAuctionInit() {
- analyticsAdapter.context.auctionTimeStart = Date.now();
- const event = createHbEvent(undefined, ADK_HB_EVENTS.AUCTION_INIT);
- return [event];
-}
-
-function trackBidRequest(args) {
- return args.bids.map(bid =>
- createHbEvent(args.bidderCode, ADK_HB_EVENTS.BID_REQUEST, bid.adUnitCode));
-}
-
-function trackBidResponse(args) {
- const event = createHbEvent(args.bidderCode, ADK_HB_EVENTS.BID_RESPONSE,
- args.adUnitCode, args.cpm, args.timeToRespond / 1000);
- return [event];
-}
-
-function trackBidWon(args) {
- const event = createHbEvent(args.bidderCode, ADK_HB_EVENTS.BID_WON, args.adUnitCode, args.cpm);
- return [event];
-}
-
-function trackAuctionEnd(args) {
- const event = createHbEvent(undefined, ADK_HB_EVENTS.AUCTION_END, undefined,
- undefined, (Date.now() - analyticsAdapter.context.auctionTimeStart) / 1000);
- return [event];
-}
-
-function trackBidTimeout(args) {
- return args.map(bidderName => createHbEvent(bidderName, ADK_HB_EVENTS.TIMEOUT));
-}
-
-function createHbEvent(adapter, event, tagid = undefined, value = 0, time = 0) {
- let ev = { event: event };
- if (adapter) {
- ev.adapter = adapter
- }
- if (tagid) {
- ev.tagid = tagid;
- }
- if (value) {
- ev.val = value;
- }
- if (time) {
- ev.time = time;
- }
- return ev;
-}
-
-const UTM_TAGS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',
- 'utm_c1', 'utm_c2', 'utm_c3', 'utm_c4', 'utm_c5'];
-const ADKERNEL_PREBID_KEY = 'adk_dpt_analytics';
-const DIRECT = '(direct)';
-const REFERRAL = '(referral)';
-const ORGANIC = '(organic)';
-
-export let storage = {
- getItem: (name) => {
- return localStorage.getItem(name);
- },
- setItem: (name, value) => {
- localStorage.setItem(name, value);
- }
-};
-
-export function getUmtSource(pageUrl, referrer) {
- let prevUtm = getPreviousTrafficSource();
- let currUtm = getCurrentTrafficSource(pageUrl, referrer);
- let [updated, actual] = chooseActualUtm(prevUtm, currUtm);
- if (updated) {
- storeUtm(actual);
- }
- return actual;
-
- function getPreviousTrafficSource() {
- let val = storage.getItem(ADKERNEL_PREBID_KEY);
- if (!val) {
- return getDirect();
- }
- return JSON.parse(val);
- }
-
- function getCurrentTrafficSource(pageUrl, referrer) {
- var source = getUTM(pageUrl);
- if (source) {
- return source;
- }
- if (referrer) {
- let se = getSearchEngine(referrer);
- if (se) {
- return asUtm(se, ORGANIC, ORGANIC);
- }
- let parsedUrl = parse(pageUrl);
- let [refHost, refPath] = getReferrer(referrer);
- if (refHost && refHost !== parsedUrl.hostname) {
- return asUtm(refHost, REFERRAL, REFERRAL, '', refPath);
- }
- }
- return getDirect();
- }
-
- function getSearchEngine(pageUrl) {
- let engines = {
- 'google': /^https?\:\/\/(?:www\.)?(?:google\.(?:com?\.)?(?:com|cat|[a-z]{2})|g.cn)\//i,
- 'yandex': /^https?\:\/\/(?:www\.)?ya(?:ndex\.(?:com|net)?\.?(?:asia|mobi|org|[a-z]{2})?|\.ru)\//i,
- 'bing': /^https?\:\/\/(?:www\.)?bing\.com\//i,
- 'duckduckgo': /^https?\:\/\/(?:www\.)?duckduckgo\.com\//i,
- 'ask': /^https?\:\/\/(?:www\.)?ask\.com\//i,
- 'yahoo': /^https?\:\/\/(?:[-a-z]+\.)?(?:search\.)?yahoo\.com\//i
- };
-
- for (let engine in engines) {
- if (engines.hasOwnProperty(engine) && engines[engine].test(pageUrl)) {
- return engine;
- }
- }
- }
-
- function getReferrer(referrer) {
- let ref = parse(referrer);
- return [ref.hostname, ref.pathname];
- }
-
- function getUTM(pageUrl) {
- let urlParameters = parse(pageUrl).search;
- if (!urlParameters['utm_campaign'] || !urlParameters['utm_source']) {
- return;
- }
- let utmArgs = [];
- utils._each(UTM_TAGS, (utmTagName) => {
- let utmValue = urlParameters[utmTagName] || '';
- utmArgs.push(utmValue);
- });
- return asUtm.apply(this, utmArgs);
- }
-
- function getDirect() {
- return asUtm(DIRECT, DIRECT, DIRECT);
- }
-
- function storeUtm(utm) {
- let val = JSON.stringify(utm);
- storage.setItem(ADKERNEL_PREBID_KEY, val);
- }
-
- function asUtm(source, medium, campaign, term = '', content = '', c1 = '', c2 = '', c3 = '', c4 = '', c5 = '') {
- let result = {
- source: source,
- medium: medium,
- campaign: campaign
- };
- if (term) {
- result.term = term;
- }
- if (content) {
- result.content = content;
- }
- if (c1) {
- result.c1 = c1;
- }
- if (c2) {
- result.c2 = c2;
- }
- if (c3) {
- result.c3 = c3;
- }
- if (c4) {
- result.c4 = c4;
- }
- if (c5) {
- result.c5 = c5;
- }
- return result;
- }
-
- function chooseActualUtm(prev, curr) {
- if (ord(prev) < ord(curr)) {
- return [true, curr];
- } if (ord(prev) > ord(curr)) {
- return [false, prev];
- } else {
- if (prev.campaign === REFERRAL && prev.content !== curr.content) {
- return [true, curr];
- } else if (prev.campaign === ORGANIC && prev.source !== curr.source) {
- return [true, curr];
- } else if (isCampaignTraffic(prev) && (prev.campaign !== curr.campaign || prev.source !== curr.source)) {
- return [true, curr];
- }
- }
- return [false, prev];
- }
-
- function ord(utm) {
- switch (utm.campaign) {
- case DIRECT:
- return 0;
- case ORGANIC:
- return 1;
- case REFERRAL:
- return 2;
- default:
- return 3;
- }
- }
-
- function isCampaignTraffic(utm) {
- return [DIRECT, REFERRAL, ORGANIC].indexOf(utm.campaign) === -1;
- }
-}
-
-/**
- * Expiring queue implementation. Fires callback on elapsed timeout since last last update or creation.
- * @param callback
- * @param ttl
- * @constructor
- */
-export function ExpiringQueue(callback, ttl) {
- let queue = [];
- let timeoutId;
-
- this.push = (event) => {
- if (event instanceof Array) {
- queue.push.apply(queue, event);
- } else {
- queue.push(event);
- }
- reset();
- };
-
- this.popAll = () => {
- let result = queue;
- queue = [];
- reset();
- return result;
- };
-
- /**
- * For test/debug purposes only
- * @return {Array}
- */
- this.peekAll = () => {
- return queue;
- };
-
- this.init = reset;
-
- function reset() {
- if (timeoutId) {
- clearTimeout(timeoutId);
- }
- timeoutId = setTimeout(() => {
- if (queue.length) {
- callback();
- }
- }, ttl);
- }
-}
diff --git a/modules/admanBidAdapter.js b/modules/admanBidAdapter.js
deleted file mode 100644
index 4720d06d094e..000000000000
--- a/modules/admanBidAdapter.js
+++ /dev/null
@@ -1,79 +0,0 @@
-import {registerBidder} from '../src/adapters/bidderFactory';
-import * as utils from '../src/utils';
-
-const BIDDER_CODE = 'adman';
-
-export const spec = {
- code: BIDDER_CODE,
- supportedMediaTypes: ['video', 'banner'],
- isBidRequestValid: function(bid) {
- const isValid = _validateId(utils.deepAccess(bid, 'params.id'));
- if (!isValid) {
- utils.logError('Adman id parameter is required. Bid aborted.');
- }
- return isValid;
- },
- buildRequests: function(validBidRequests, bidderRequest) {
- const ENDPOINT_URL = '//bidtor.admanmedia.com/prebid';
- const bids = validBidRequests.map(buildRequestObject);
- const payload = {
- referer: utils.getTopWindowUrl(),
- bids,
- deviceWidth: screen.width
- };
-
- if (bidderRequest && bidderRequest.gdprConsent) {
- payload.gdpr = {
- consent: bidderRequest.gdprConsent.consentString,
- applies: bidderRequest.gdprConsent.gdprApplies
- };
- } else {
- payload.gdpr = {
- consent: ''
- }
- }
-
- const payloadString = JSON.stringify(payload);
- return {
- method: 'POST',
- url: ENDPOINT_URL,
- data: payloadString,
- };
- },
- interpretResponse: function(serverResponse) {
- serverResponse = serverResponse.body;
- if (serverResponse && typeof serverResponse.bids === 'object') {
- return serverResponse.bids;
- }
- return [];
- },
- getUserSyncs: function(syncOptions) {
- if (syncOptions.iframeEnabled) {
- return [{
- type: 'iframe',
- url: '//cs.admanmedia.com/sync_tag/html'
- }];
- }
- }
-};
-
-function buildRequestObject(bid) {
- return {
- params: {
- id: utils.getValue(bid.params, 'id'),
- bidId: bid.bidId
- },
- sizes: bid.sizes,
- bidId: utils.getBidIdParameter('bidId', bid),
- bidderRequestId: utils.getBidIdParameter('bidderRequestId', bid),
- adUnitCode: utils.getBidIdParameter('adUnitCode', bid),
- auctionId: utils.getBidIdParameter('auctionId', bid),
- transactionId: utils.getBidIdParameter('transactionId', bid)
- };
-}
-
-function _validateId(id = '') {
- return (id.length === 8);
-}
-
-registerBidder(spec);
diff --git a/modules/admaticBidAdapter.js b/modules/admaticBidAdapter.js
index 727b1553d219..c0f32319d795 100644
--- a/modules/admaticBidAdapter.js
+++ b/modules/admaticBidAdapter.js
@@ -2,7 +2,7 @@ import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory';
const BIDDER_CODE = 'admatic';
-const ENDPOINT_URL = '//ads4.admatic.com.tr/prebid/v3/bidrequest';
+const ENDPOINT_URL = 'https://ads4.admatic.com.tr/prebid/v3/bidrequest';
export const spec = {
code: BIDDER_CODE,
@@ -108,7 +108,7 @@ export const spec = {
if (syncOptions.iframeEnabled) {
syncs.push({
type: 'iframe',
- url: '//ads4.admatic.com.tr/prebid/static/usersync/v3/async_usersync.html'
+ url: 'https://ads4.admatic.com.tr/prebid/static/usersync/v3/async_usersync.html'
});
}
diff --git a/modules/admediaBidAdapter.js b/modules/admediaBidAdapter.js
index 73d6ea08eea2..d6d7044a3719 100644
--- a/modules/admediaBidAdapter.js
+++ b/modules/admediaBidAdapter.js
@@ -2,7 +2,7 @@ import * as utils from '../src/utils';
import {registerBidder} from '../src/adapters/bidderFactory';
const BIDDER_CODE = 'admedia';
-const ENDPOINT_URL = '//prebid.admedia.com/bidder/';
+const ENDPOINT_URL = 'https://prebid.admedia.com/bidder/';
export const spec = {
code: BIDDER_CODE,
diff --git a/modules/admixerBidAdapter.js b/modules/admixerBidAdapter.js
deleted file mode 100644
index c6d6dd34a114..000000000000
--- a/modules/admixerBidAdapter.js
+++ /dev/null
@@ -1,73 +0,0 @@
-import * as utils from '../src/utils';
-import {registerBidder} from '../src/adapters/bidderFactory';
-
-const BIDDER_CODE = 'admixer';
-const ALIASES = ['go2net'];
-const ENDPOINT_URL = '//inv-nets.admixer.net/prebid.1.0.aspx';
-export const spec = {
- code: BIDDER_CODE,
- aliases: ALIASES,
- supportedMediaTypes: ['banner', 'video'],
- /**
- * Determines whether or not the given bid request is valid.
- *
- * @param {BidRequest} bid The bid params to validate.
- * @return boolean True if this is a valid bid, and false otherwise.
- */
- isBidRequestValid: function (bid) {
- return !!bid.params.zone;
- },
- /**
- * Make a server request from the list of BidRequests.
- *
- * @param {bidderRequest} - bidderRequest.bids[] is an array of AdUnits and bids
- * @return ServerRequest Info describing the request to the server.
- */
- buildRequests: function (bidderRequest) {
- const payload = {
- imps: [],
- referrer: encodeURIComponent(utils.getTopWindowUrl()),
- };
- bidderRequest.forEach((bid) => {
- payload.imps.push(bid);
- });
- const payloadString = JSON.stringify(payload);
- return {
- method: 'GET',
- url: ENDPOINT_URL,
- data: `data=${payloadString}`,
- };
- },
- /**
- * Unpack the response from the server into a list of bids.
- *
- * @param {*} serverResponse A successful response from the server.
- * @return {Bid[]} An array of bids which were nested inside the server.
- */
- interpretResponse: function (serverResponse, bidRequest) {
- const bidResponses = [];
- // loop through serverResponses {
- try {
- serverResponse = serverResponse.body;
- serverResponse.forEach((bidResponse) => {
- const bidResp = {
- requestId: bidResponse.bidId,
- cpm: bidResponse.cpm,
- width: bidResponse.width,
- height: bidResponse.height,
- ad: bidResponse.ad,
- ttl: bidResponse.ttl,
- creativeId: bidResponse.creativeId,
- netRevenue: bidResponse.netRevenue,
- currency: bidResponse.currency,
- vastUrl: bidResponse.vastUrl,
- };
- bidResponses.push(bidResp);
- });
- } catch (e) {
- utils.logError(e);
- }
- return bidResponses;
- }
-};
-registerBidder(spec);
diff --git a/modules/adspendBidAdapter.js b/modules/adspendBidAdapter.js
index 7818e3fc9107..d96ae20f8950 100644
--- a/modules/adspendBidAdapter.js
+++ b/modules/adspendBidAdapter.js
@@ -5,8 +5,8 @@ import { registerBidder } from '../src/adapters/bidderFactory';
import { BANNER } from '../src/mediaTypes';
const BIDDER_CODE = 'adspend';
-const BID_URL = '//rtb.com.ru/headerbidding-bid';
-const SYNC_URL = '//rtb.com.ru/headerbidding-sync?uid={UUID}';
+const BID_URL = 'https://rtb.com.ru/headerbidding-bid';
+const SYNC_URL = 'https://rtb.com.ru/headerbidding-sync?uid={UUID}';
const COOKIE_NAME = 'hb-adspend-id';
const UUID_LEN = 36;
const TTL = 10000;
diff --git a/modules/adspiritBidAdapter.js b/modules/adspiritBidAdapter.js
deleted file mode 100644
index a428a5c88293..000000000000
--- a/modules/adspiritBidAdapter.js
+++ /dev/null
@@ -1,72 +0,0 @@
-import * as utils from '../src/utils';
-import {registerBidder} from '../src/adapters/bidderFactory';
-const RTB_URL = '/rtb/getbid.php?rtbprovider=prebid';
-const SCRIPT_URL = '/adasync.min.js';
-export const spec = {
- code: 'adspirit',
- aliases: ['xapadsmedia', 'connectad'],
- isBidRequestValid: function(bid) {
- let host = spec.getBidderHost(bid);
- if (!host) return false;
- if (!bid.params.placementId) return false;
- return true;
- },
- buildRequests: function(validBidRequests) {
- let requests = [];
- let bidRequest;
- let reqUrl;
- let placementId;
- for (let i = 0; i < validBidRequests.length; i++) {
- bidRequest = validBidRequests[i];
- bidRequest.adspiritConId = spec.genAdConId(bidRequest);
- reqUrl = spec.getBidderHost(bidRequest);
- placementId = utils.getBidIdParameter('placementId', bidRequest.params);
- reqUrl = '//' + reqUrl + RTB_URL + '&pid=' + placementId + '&ref=' + encodeURIComponent(utils.getTopWindowUrl()) + '&scx=' + (screen.width) + '&scy=' + (screen.height) + '&wcx=' + ('innerWidth' in window ? window.innerWidth : page.clientWidth) + '&wcy=' + ('innerHeight' in window ? window.innerHeight : page.clientHeight) + '&async=' + bidRequest.adspiritConId + '&t=' + Math.round(Math.random() * 100000);
- requests.push({
- method: 'GET',
- url: reqUrl,
- data: {},
- bidRequest: bidRequest
- });
- }
- return requests;
- },
- interpretResponse: function(serverResponse, bidRequest) {
- const bidResponses = [];
- let bidObj = bidRequest.bidRequest;
-
- if (!serverResponse || !serverResponse.body || !bidObj) {
- utils.logWarn(`No valid bids from ${spec.code} bidder!`);
- return [];
- }
- let adData = serverResponse.body;
- let cpm = adData.cpm;
- if (!cpm) return [];
-
- let host = spec.getBidderHost(bidObj);
- let adm = '