prebid.js 7.43.0 → 7.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelAdnAnalyticsAdapter.js +1 -1
- package/dist/admixerIdSystem.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adqueryIdSystem.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adrinoBidAdapter.js +1 -1
- package/dist/adriverIdSystem.js +1 -1
- package/dist/adsinteractiveBidAdapter.js +1 -0
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/aidemBidAdapter.js +1 -1
- package/dist/airgridRtdProvider.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/akamaiDapRtdProvider.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/apstreamBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/atsAnalyticsAdapter.js +1 -1
- package/dist/audiencerunBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bedigitechBidAdapter.js +1 -0
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bluebillywigBidAdapter.js +1 -1
- package/dist/blueconicRtdProvider.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/brightcomBidAdapter.js +1 -1
- package/dist/brightcomSSPBidAdapter.js +1 -1
- package/dist/browsiRtdProvider.js +1 -1
- package/dist/byDataAnalyticsAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/criteoIdSystem.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/czechAdIdSystem.js +1 -1
- package/dist/dacIdSystem.js +1 -1
- package/dist/deepintentDpesIdSystem.js +1 -1
- package/dist/dependencies.json +3 -0
- package/dist/discoveryBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/fintezaAnalyticsAdapter.js +1 -1
- package/dist/fledgeForGpt.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/ftrackIdSystem.js +1 -1
- package/dist/gdprEnforcement.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/gnetBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gravitoIdSystem.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -0
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/growthCodeAnalyticsAdapter.js +1 -1
- package/dist/growthCodeIdSystem.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hadronAnalyticsAdapter.js +1 -1
- package/dist/hadronIdSystem.js +1 -1
- package/dist/hadronRtdProvider.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/idWardRtdProvider.js +1 -1
- package/dist/identityLinkIdSystem.js +1 -1
- package/dist/idxIdSystem.js +1 -1
- package/dist/imRtdProvider.js +1 -1
- package/dist/impactifyBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/imuIdSystem.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqIdSystem.js +1 -1
- package/dist/invibesBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/kulturemediaBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentIdSystem.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/lotamePanoramaIdSystem.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediagoBidAdapter.js +1 -1
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/merkleIdSystem.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/mgidRtdProvider.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/mwOpenLinkIdSystem.js +1 -1
- package/dist/naveggIdSystem.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/nobidBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +205 -202
- package/dist/novatiqIdSystem.js +1 -1
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxOrtbBidAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/ortbConverter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/permutiveRtdProvider.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/prebidmanagerAnalyticsAdapter.js +1 -1
- package/dist/pubCommonId.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/quantcastIdSystem.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/realvuAnalyticsAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/roxotAnalyticsAdapter.js +1 -1
- package/dist/rtbhouseBidAdapter.js +1 -1
- package/dist/rtdModule.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharedIdSystem.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/sigmoidAnalyticsAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/staqAnalyticsAdapter.js +1 -1
- package/dist/stroeerCoreBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/teadsIdSystem.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/trustpidSystem.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/uid2IdSystem.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/validationFpdModule.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/vidoomyBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/weboramaRtdProvider.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/yuktamediaAnalyticsAdapter.js +1 -1
- package/dist/zeotapIdPlusIdSystem.js +1 -1
- package/dist/zeta_global_sspBidAdapter.js +1 -1
- package/libraries/ortbConverter/converter.js +3 -2
- package/modules/33acrossIdSystem.js +5 -2
- package/modules/adagioBidAdapter.js +3 -4
- package/modules/adkernelAdnAnalyticsAdapter.js +4 -2
- package/modules/admixerIdSystem.js +4 -2
- package/modules/adnuntiusBidAdapter.js +1 -1
- package/modules/adqueryBidAdapter.js +1 -1
- package/modules/adqueryIdSystem.js +2 -1
- package/modules/adrinoBidAdapter.js +24 -16
- package/modules/adriverIdSystem.js +3 -2
- package/modules/adsinteractiveBidAdapter.js +144 -0
- package/modules/adsinteractiveBidAdapter.md +31 -0
- package/modules/adyoulikeBidAdapter.js +2 -3
- package/modules/aidemBidAdapter.js +5 -0
- package/modules/airgridRtdProvider.js +4 -2
- package/modules/ajaBidAdapter.js +38 -16
- package/modules/akamaiDapRtdProvider.js +2 -1
- package/modules/amxBidAdapter.js +11 -9
- package/modules/appnexusBidAdapter.js +8 -8
- package/modules/apstreamBidAdapter.js +1 -1
- package/modules/atsAnalyticsAdapter.js +4 -2
- package/modules/audiencerunBidAdapter.js +9 -10
- package/modules/bedigitechBidAdapter.js +67 -0
- package/modules/bedigitechBidAdapter.md +32 -0
- package/modules/bluebillywigBidAdapter.js +2 -4
- package/modules/blueconicRtdProvider.js +2 -1
- package/modules/brightcomBidAdapter.js +0 -1
- package/modules/brightcomSSPBidAdapter.js +0 -1
- package/modules/browsiRtdProvider.js +4 -2
- package/modules/byDataAnalyticsAdapter.js +6 -3
- package/modules/concertBidAdapter.js +14 -7
- package/modules/connectadBidAdapter.js +2 -4
- package/modules/craftBidAdapter.js +29 -24
- package/modules/criteoBidAdapter.js +4 -2
- package/modules/criteoIdSystem.js +6 -2
- package/modules/czechAdIdSystem.js +3 -2
- package/modules/dacIdSystem.js +4 -3
- package/modules/deepintentDpesIdSystem.js +3 -2
- package/modules/discoveryBidAdapter.js +1 -1
- package/modules/dspxBidAdapter.js +223 -15
- package/modules/fintezaAnalyticsAdapter.js +5 -3
- package/modules/fledgeForGpt.js +54 -6
- package/modules/ftrackIdSystem.js +6 -6
- package/modules/gdprEnforcement.js +56 -68
- package/modules/glimpseBidAdapter.js +1 -4
- package/modules/gnetBidAdapter.js +1 -2
- package/modules/gravitoIdSystem.js +5 -3
- package/modules/greenbidsAnalyticsAdapter.js +181 -0
- package/modules/greenbidsAnalyticsAdapter.md +23 -0
- package/modules/gridBidAdapter.js +13 -7
- package/modules/growthCodeAnalyticsAdapter.js +3 -2
- package/modules/growthCodeIdSystem.js +3 -2
- package/modules/gumgumBidAdapter.js +7 -17
- package/modules/hadronAnalyticsAdapter.js +5 -3
- package/modules/hadronIdSystem.js +3 -1
- package/modules/hadronRtdProvider.js +4 -2
- package/modules/id5IdSystem.js +4 -2
- package/modules/idWardRtdProvider.js +2 -1
- package/modules/identityLinkIdSystem.js +5 -2
- package/modules/idxIdSystem.js +3 -2
- package/modules/imRtdProvider.js +3 -1
- package/modules/impactifyBidAdapter.js +2 -4
- package/modules/imuIdSystem.js +6 -3
- package/modules/insticatorBidAdapter.js +1 -1
- package/modules/intentIqIdSystem.js +3 -2
- package/modules/invibesBidAdapter.js +1 -1
- package/modules/ixBidAdapter.js +1 -1
- package/modules/jixieBidAdapter.js +3 -6
- package/modules/kargoBidAdapter.js +1 -1
- package/modules/kueezRtbBidAdapter.js +1 -1
- package/modules/liveIntentIdSystem.js +3 -2
- package/modules/lotamePanoramaIdSystem.js +3 -2
- package/modules/magniteAnalyticsAdapter.js +25 -6
- package/modules/mediafuseBidAdapter.js +1 -1
- package/modules/mediagoBidAdapter.js +1 -1
- package/modules/mediakeysBidAdapter.js +2 -3
- package/modules/merkleIdSystem.js +2 -1
- package/modules/mgidBidAdapter.js +1 -1
- package/modules/mgidRtdProvider.js +3 -1
- package/modules/minutemediaplusBidAdapter.js +1 -1
- package/modules/mwOpenLinkIdSystem.js +3 -2
- package/modules/naveggIdSystem.js +3 -2
- package/modules/nexx360BidAdapter.js +0 -1
- package/modules/nobidBidAdapter.js +1 -1
- package/modules/novatiqIdSystem.js +6 -3
- package/modules/onetagBidAdapter.js +1 -1
- package/modules/openxOrtbBidAdapter.js +19 -7
- package/modules/openxOrtbBidAdapter.md +6 -5
- package/modules/parrableIdSystem.js +4 -2
- package/modules/permutiveRtdProvider.js +2 -1
- package/modules/prebidServerBidAdapter/index.js +9 -3
- package/modules/prebidServerBidAdapter/ortbConverter.js +12 -2
- package/modules/prebidmanagerAnalyticsAdapter.js +3 -2
- package/modules/pubCommonId.js +6 -3
- package/modules/publinkIdSystem.js +2 -1
- package/modules/pubmaticAnalyticsAdapter.js +12 -1
- package/modules/pubmaticBidAdapter.js +192 -222
- package/modules/pubwiseAnalyticsAdapter.js +5 -3
- package/modules/quantcastBidAdapter.js +1 -1
- package/modules/quantcastIdSystem.js +5 -3
- package/modules/realvuAnalyticsAdapter.js +6 -3
- package/modules/roxotAnalyticsAdapter.js +5 -2
- package/modules/rtbhouseBidAdapter.js +5 -3
- package/modules/rtdModule/index.js +3 -0
- package/modules/rubiconAnalyticsAdapter.js +3 -2
- package/modules/rubiconBidAdapter.js +1 -0
- package/modules/sharedIdSystem.js +12 -9
- package/modules/sharethroughBidAdapter.js +1 -2
- package/modules/sigmoidAnalyticsAdapter.js +4 -2
- package/modules/smartadserverBidAdapter.js +2 -3
- package/modules/sovrnBidAdapter.js +2 -3
- package/modules/staqAnalyticsAdapter.js +5 -3
- package/modules/stroeerCoreBidAdapter.js +3 -2
- package/modules/taboolaBidAdapter.js +4 -2
- package/modules/teadsBidAdapter.js +1 -1
- package/modules/teadsIdSystem.js +2 -1
- package/modules/tripleliftBidAdapter.js +1 -1
- package/modules/trustpidSystem.js +3 -2
- package/modules/ttdBidAdapter.js +11 -5
- package/modules/uid2IdSystem.js +3 -2
- package/modules/undertoneBidAdapter.js +1 -0
- package/modules/userId/index.js +5 -2
- package/modules/validationFpdModule/index.js +3 -2
- package/modules/vidazooBidAdapter.js +14 -5
- package/modules/vidoomyBidAdapter.js +29 -1
- package/modules/weboramaRtdProvider.js +3 -1
- package/modules/yieldmoBidAdapter.js +2 -3
- package/modules/yuktamediaAnalyticsAdapter.js +4 -2
- package/modules/zeotapIdPlusIdSystem.js +3 -2
- package/modules/zeta_global_sspBidAdapter.js +3 -0
- package/package.json +1 -1
- package/plugins/eslint/validateImports.js +13 -14
- package/plugins/pbjsGlobals.js +3 -1
- package/src/activities/modules.js +5 -0
- package/src/adapterManager.js +4 -8
- package/src/adapters/bidderFactory.js +30 -16
- package/src/consentHandler.js +42 -0
- package/src/refererDetection.js +39 -21
- package/src/secureCreatives.js +2 -2
- package/src/storageManager.js +33 -47
- package/src/userSync.js +7 -4
- package/test/spec/modules/33acrossIdSystem_spec.js +1 -1
- package/test/spec/modules/adagioBidAdapter_spec.js +11 -17
- package/test/spec/modules/admixerIdSystem_spec.js +0 -3
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +6 -6
- package/test/spec/modules/adrinoBidAdapter_spec.js +65 -34
- package/test/spec/modules/adsinteractiveBidAdapter_spec.js +207 -0
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +13 -11
- package/test/spec/modules/aidemBidAdapter_spec.js +72 -8
- package/test/spec/modules/amxBidAdapter_spec.js +4 -1
- package/test/spec/modules/atsAnalyticsAdapter_spec.js +2 -2
- package/test/spec/modules/audiencerunBidAdapter_spec.js +8 -11
- package/test/spec/modules/bedigitechBidAdapter_spec.js +145 -0
- package/test/spec/modules/bluebillywigBidAdapter_spec.js +1 -3
- package/test/spec/modules/concertBidAdapter_spec.js +3 -8
- package/test/spec/modules/connectadBidAdapter_spec.js +11 -3
- package/test/spec/modules/criteoBidAdapter_spec.js +29 -0
- package/test/spec/modules/criteoIdSystem_spec.js +38 -0
- package/test/spec/modules/datablocksBidAdapter_spec.js +0 -1
- package/test/spec/modules/dspxBidAdapter_spec.js +184 -13
- package/test/spec/modules/fledge_spec.js +173 -2
- package/test/spec/modules/gdprEnforcement_spec.js +134 -164
- package/test/spec/modules/greenbidsAnalyticsAdapter_spec.js +418 -0
- package/test/spec/modules/gridBidAdapter_spec.js +9 -5
- package/test/spec/modules/growthCodeIdSystem_spec.js +2 -1
- package/test/spec/modules/id5IdSystem_spec.js +41 -4
- package/test/spec/modules/identityLinkIdSystem_spec.js +2 -2
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +10 -3
- package/test/spec/modules/jixieBidAdapter_spec.js +42 -60
- package/test/spec/modules/mediakeysBidAdapter_spec.js +12 -16
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +96 -11
- package/test/spec/modules/prebidServerBidAdapter_spec.js +68 -2
- package/test/spec/modules/publinkIdSystem_spec.js +3 -2
- package/test/spec/modules/pubmaticBidAdapter_spec.js +67 -10
- package/test/spec/modules/realTimeDataModule_spec.js +22 -0
- package/test/spec/modules/realvuAnalyticsAdapter_spec.js +0 -1
- package/test/spec/modules/relaidoBidAdapter_spec.js +5 -5
- package/test/spec/modules/rubiconBidAdapter_spec.js +2 -1
- package/test/spec/modules/sharethroughBidAdapter_spec.js +97 -21
- package/test/spec/modules/smartadserverBidAdapter_spec.js +74 -12
- package/test/spec/modules/sovrnBidAdapter_spec.js +25 -6
- package/test/spec/modules/stroeerCoreBidAdapter_spec.js +13 -18
- package/test/spec/modules/taboolaBidAdapter_spec.js +101 -0
- package/test/spec/modules/ttdBidAdapter_spec.js +25 -7
- package/test/spec/modules/userId_spec.js +68 -0
- package/test/spec/modules/vidazooBidAdapter_spec.js +13 -0
- package/test/spec/modules/vidoomyBidAdapter_spec.js +33 -0
- package/test/spec/modules/yieldmoBidAdapter_spec.js +18 -2
- package/test/spec/modules/zeotapIdPlusIdSystem_spec.js +3 -2
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +8 -0
- package/test/spec/refererDetection_spec.js +56 -1
- package/test/spec/unit/core/adapterManager_spec.js +21 -58
- package/test/spec/unit/core/bidderFactory_spec.js +28 -10
- package/test/spec/unit/core/consentHandler_spec.js +29 -1
- package/test/spec/unit/core/storageManager_spec.js +31 -21
- package/test/spec/userSync_spec.js +2 -1
package/src/adapterManager.js
CHANGED
|
@@ -31,11 +31,12 @@ import {hook} from './hook.js';
|
|
|
31
31
|
import {find, includes} from './polyfill.js';
|
|
32
32
|
import {adunitCounter} from './adUnits.js';
|
|
33
33
|
import {getRefererInfo} from './refererDetection.js';
|
|
34
|
-
import {GdprConsentHandler, UspConsentHandler, GppConsentHandler} from './consentHandler.js';
|
|
34
|
+
import {GdprConsentHandler, UspConsentHandler, GppConsentHandler, GDPR_GVLIDS} from './consentHandler.js';
|
|
35
35
|
import * as events from './events.js';
|
|
36
36
|
import CONSTANTS from './constants.json';
|
|
37
37
|
import {useMetrics} from './utils/perfMetrics.js';
|
|
38
38
|
import {auctionManager} from './auctionManager.js';
|
|
39
|
+
import {MODULE_TYPE_ANALYTICS, MODULE_TYPE_BIDDER} from './activities/modules.js';
|
|
39
40
|
|
|
40
41
|
export const PARTITIONS = {
|
|
41
42
|
CLIENT: 'client',
|
|
@@ -338,13 +339,6 @@ adapterManager.makeBidRequests = hook('sync', function (adUnits, auctionStart, a
|
|
|
338
339
|
}
|
|
339
340
|
});
|
|
340
341
|
|
|
341
|
-
bidRequests.forEach(bidRequest => {
|
|
342
|
-
config.runWithBidder(bidRequest.bidderCode, () => {
|
|
343
|
-
const fledgeEnabledFromConfig = config.getConfig('fledgeEnabled');
|
|
344
|
-
bidRequest['fledgeEnabled'] = navigator.runAdAuction && fledgeEnabledFromConfig
|
|
345
|
-
});
|
|
346
|
-
});
|
|
347
|
-
|
|
348
342
|
return bidRequests;
|
|
349
343
|
}, 'makeBidRequests');
|
|
350
344
|
|
|
@@ -470,6 +464,7 @@ adapterManager.registerBidAdapter = function (bidAdapter, bidderCode, {supported
|
|
|
470
464
|
if (bidAdapter && bidderCode) {
|
|
471
465
|
if (typeof bidAdapter.callBids === 'function') {
|
|
472
466
|
_bidderRegistry[bidderCode] = bidAdapter;
|
|
467
|
+
GDPR_GVLIDS.register(MODULE_TYPE_BIDDER, bidderCode, bidAdapter.getSpec?.().gvlid);
|
|
473
468
|
|
|
474
469
|
if (FEATURES.VIDEO && includes(supportedMediaTypes, 'video')) {
|
|
475
470
|
adapterManager.videoAdapters.push(bidderCode);
|
|
@@ -539,6 +534,7 @@ adapterManager.registerAnalyticsAdapter = function ({adapter, code, gvlid}) {
|
|
|
539
534
|
if (typeof adapter.enableAnalytics === 'function') {
|
|
540
535
|
adapter.code = code;
|
|
541
536
|
_analyticsRegistry[code] = { adapter, gvlid };
|
|
537
|
+
GDPR_GVLIDS.register(MODULE_TYPE_ANALYTICS, code, gvlid);
|
|
542
538
|
} else {
|
|
543
539
|
logError(`Prebid Error: Analytics adaptor error for analytics "${code}"
|
|
544
540
|
analytics adapter must implement an enableAnalytics() function`);
|
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
import Adapter from '../adapter.js';
|
|
2
2
|
import adapterManager from '../adapterManager.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import {config} from '../config.js';
|
|
4
|
+
import {createBid} from '../bidfactory.js';
|
|
5
|
+
import {userSync} from '../userSync.js';
|
|
6
|
+
import {nativeBidIsValid} from '../native.js';
|
|
7
|
+
import {isValidVideoBid} from '../video.js';
|
|
8
8
|
import CONSTANTS from '../constants.json';
|
|
9
9
|
import * as events from '../events.js';
|
|
10
10
|
import {includes} from '../polyfill.js';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
import {ajax} from '../ajax.js';
|
|
12
|
+
import {
|
|
13
|
+
deepAccess,
|
|
14
|
+
delayExecution,
|
|
15
|
+
flatten,
|
|
16
|
+
isArray,
|
|
17
|
+
isPlainObject,
|
|
18
|
+
logError,
|
|
19
|
+
logWarn,
|
|
20
|
+
parseQueryStringParameters,
|
|
21
|
+
parseSizesInput,
|
|
22
|
+
timestamp,
|
|
23
|
+
uniques
|
|
24
|
+
} from '../utils.js';
|
|
25
|
+
import {ADPOD} from '../mediaTypes.js';
|
|
26
|
+
import {getHook, hook} from '../hook.js';
|
|
27
|
+
import {getCoreStorageManager} from '../storageManager.js';
|
|
16
28
|
import {auctionManager} from '../auctionManager.js';
|
|
17
|
-
import {
|
|
29
|
+
import {bidderSettings} from '../bidderSettings.js';
|
|
18
30
|
import {useMetrics} from '../utils/perfMetrics.js';
|
|
19
31
|
|
|
20
32
|
export const storage = getCoreStorageManager('bidderFactory');
|
|
@@ -187,7 +199,7 @@ export function registerBidder(spec) {
|
|
|
187
199
|
export function newBidder(spec) {
|
|
188
200
|
return Object.assign(new Adapter(spec.code), {
|
|
189
201
|
getSpec: function() {
|
|
190
|
-
return Object.freeze(spec);
|
|
202
|
+
return Object.freeze(Object.assign({}, spec));
|
|
191
203
|
},
|
|
192
204
|
registerSyncs,
|
|
193
205
|
callBids: function(bidderRequest, addBidResponse, done, ajax, onTimelyResponse, configEnabledCallback) {
|
|
@@ -247,7 +259,9 @@ export function newBidder(spec) {
|
|
|
247
259
|
fledgeAuctionConfigs.forEach((fledgeAuctionConfig) => {
|
|
248
260
|
const bidRequest = bidRequestMap[fledgeAuctionConfig.bidId];
|
|
249
261
|
if (bidRequest) {
|
|
250
|
-
addComponentAuction(bidRequest, fledgeAuctionConfig);
|
|
262
|
+
addComponentAuction(bidRequest.adUnitCode, fledgeAuctionConfig.config);
|
|
263
|
+
} else {
|
|
264
|
+
logWarn('Received fledge auction configuration for an unknown bidId', fledgeAuctionConfig);
|
|
251
265
|
}
|
|
252
266
|
});
|
|
253
267
|
},
|
|
@@ -463,13 +477,13 @@ export const registerSyncInner = hook('async', function(spec, responses, gdprCon
|
|
|
463
477
|
syncs.forEach((sync) => {
|
|
464
478
|
userSync.registerSync(sync.type, spec.code, sync.url)
|
|
465
479
|
});
|
|
480
|
+
userSync.bidderDone(spec.code);
|
|
466
481
|
}
|
|
467
482
|
}
|
|
468
483
|
}, 'registerSyncs')
|
|
469
484
|
|
|
470
|
-
export const addComponentAuction = hook('sync', (
|
|
471
|
-
|
|
472
|
-
}, 'addComponentAuction')
|
|
485
|
+
export const addComponentAuction = hook('sync', (adUnitCode, fledgeAuctionConfig) => {
|
|
486
|
+
}, 'addComponentAuction');
|
|
473
487
|
|
|
474
488
|
export function preloadBidderMappingFile(fn, adUnits) {
|
|
475
489
|
if (FEATURES.VIDEO) {
|
package/src/consentHandler.js
CHANGED
|
@@ -118,3 +118,45 @@ export class GppConsentHandler extends ConsentHandler {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
+
|
|
122
|
+
export function gvlidRegistry() {
|
|
123
|
+
const registry = {};
|
|
124
|
+
const flat = {};
|
|
125
|
+
const none = {};
|
|
126
|
+
return {
|
|
127
|
+
/**
|
|
128
|
+
* Register a module's GVL ID.
|
|
129
|
+
* @param {string} moduleType defined in `activities/modules.js`
|
|
130
|
+
* @param {string} moduleName
|
|
131
|
+
* @param {number} gvlid
|
|
132
|
+
*/
|
|
133
|
+
register(moduleType, moduleName, gvlid) {
|
|
134
|
+
if (gvlid) {
|
|
135
|
+
(registry[moduleName] = registry[moduleName] || {})[moduleType] = gvlid;
|
|
136
|
+
if (flat.hasOwnProperty(moduleName)) {
|
|
137
|
+
if (flat[moduleName] !== gvlid) flat[moduleName] = none;
|
|
138
|
+
} else {
|
|
139
|
+
flat[moduleName] = gvlid;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
* Get a module's GVL ID(s).
|
|
145
|
+
*
|
|
146
|
+
* @param {string} moduleName
|
|
147
|
+
* @return {{modules: {[moduleType]: number}, gvlid?: number}} an object where:
|
|
148
|
+
* `modules` is a map from module type to that module's GVL ID;
|
|
149
|
+
* `gvlid` is the single GVL ID for this family of modules (only defined
|
|
150
|
+
* if all modules with this name declared the same ID).
|
|
151
|
+
*/
|
|
152
|
+
get(moduleName) {
|
|
153
|
+
const result = {modules: registry[moduleName] || {}};
|
|
154
|
+
if (flat.hasOwnProperty(moduleName) && flat[moduleName] !== none) {
|
|
155
|
+
result.gvlid = flat[moduleName];
|
|
156
|
+
}
|
|
157
|
+
return result;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export const GDPR_GVLIDS = gvlidRegistry();
|
package/src/refererDetection.js
CHANGED
|
@@ -51,6 +51,26 @@ export function parseDomain(url, {noLeadingWww = false, noPort = false} = {}) {
|
|
|
51
51
|
return url;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* This function returns canonical URL which refers to an HTML link element, with the attribute of rel="canonical", found in the <head> element of your webpage
|
|
56
|
+
*
|
|
57
|
+
* @param {Object} doc document
|
|
58
|
+
* @returns {string|null}
|
|
59
|
+
*/
|
|
60
|
+
function getCanonicalUrl(doc) {
|
|
61
|
+
try {
|
|
62
|
+
const element = doc.querySelector("link[rel='canonical']");
|
|
63
|
+
|
|
64
|
+
if (element !== null) {
|
|
65
|
+
return element.href;
|
|
66
|
+
}
|
|
67
|
+
} catch (e) {
|
|
68
|
+
// Ignore error
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
|
|
54
74
|
/**
|
|
55
75
|
* @param {Window} win Window
|
|
56
76
|
* @returns {Function}
|
|
@@ -75,26 +95,6 @@ export function detectReferer(win) {
|
|
|
75
95
|
}
|
|
76
96
|
}
|
|
77
97
|
|
|
78
|
-
/**
|
|
79
|
-
* This function returns canonical URL which refers to an HTML link element, with the attribute of rel="canonical", found in the <head> element of your webpage
|
|
80
|
-
*
|
|
81
|
-
* @param {Object} doc document
|
|
82
|
-
* @returns {string|null}
|
|
83
|
-
*/
|
|
84
|
-
function getCanonicalUrl(doc) {
|
|
85
|
-
try {
|
|
86
|
-
const element = doc.querySelector("link[rel='canonical']");
|
|
87
|
-
|
|
88
|
-
if (element !== null) {
|
|
89
|
-
return element.href;
|
|
90
|
-
}
|
|
91
|
-
} catch (e) {
|
|
92
|
-
// Ignore error
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return null;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
98
|
// TODO: the meaning of "reachedTop" seems to be intentionally ambiguous - best to leave them out of
|
|
99
99
|
// the typedef for now. (for example, unit tests enforce that "reachedTop" should be false in some situations where we
|
|
100
100
|
// happily provide a location for the top).
|
|
@@ -260,7 +260,25 @@ export function detectReferer(win) {
|
|
|
260
260
|
return refererInfo;
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
+
// cache result of fn (= referer info) as long as:
|
|
264
|
+
// - we are the top window
|
|
265
|
+
// - canonical URL tag and window location have not changed
|
|
266
|
+
export function cacheWithLocation(fn, win = window) {
|
|
267
|
+
if (win.top !== win) return fn;
|
|
268
|
+
let canonical, href, value;
|
|
269
|
+
return function () {
|
|
270
|
+
const newCanonical = getCanonicalUrl(win.document);
|
|
271
|
+
const newHref = win.location.href;
|
|
272
|
+
if (canonical !== newCanonical || newHref !== href) {
|
|
273
|
+
canonical = newCanonical;
|
|
274
|
+
href = newHref;
|
|
275
|
+
value = fn();
|
|
276
|
+
}
|
|
277
|
+
return value;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
263
281
|
/**
|
|
264
282
|
* @type {function(): refererInfo}
|
|
265
283
|
*/
|
|
266
|
-
export const getRefererInfo = detectReferer(window);
|
|
284
|
+
export const getRefererInfo = cacheWithLocation(detectReferer(window));
|
package/src/secureCreatives.js
CHANGED
|
@@ -73,7 +73,7 @@ function handleRenderRequest(reply, data, adObject) {
|
|
|
73
73
|
if (adObject == null) {
|
|
74
74
|
emitAdRenderFail({
|
|
75
75
|
reason: constants.AD_RENDER_FAILED_REASON.CANNOT_FIND_AD,
|
|
76
|
-
message: `Cannot find ad
|
|
76
|
+
message: `Cannot find ad for cross-origin render request: '${data.adId}'`,
|
|
77
77
|
id: data.adId
|
|
78
78
|
});
|
|
79
79
|
return;
|
|
@@ -111,7 +111,7 @@ function handleNativeRequest(reply, data, adObject) {
|
|
|
111
111
|
// adId: '%%PATTERN:hb_adid%%'
|
|
112
112
|
// }), '*');
|
|
113
113
|
if (adObject == null) {
|
|
114
|
-
logError(`Cannot find ad
|
|
114
|
+
logError(`Cannot find ad for x-origin event request: '${data.adId}'`);
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
|
package/src/storageManager.js
CHANGED
|
@@ -1,51 +1,30 @@
|
|
|
1
1
|
import {hook} from './hook.js';
|
|
2
|
-
import {
|
|
2
|
+
import {checkCookieSupport, hasDeviceAccess, logError, logInfo} from './utils.js';
|
|
3
3
|
import {bidderSettings as defaultBidderSettings} from './bidderSettings.js';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const moduleTypeWhiteList = ['core', 'prebid-module'];
|
|
7
|
-
|
|
8
|
-
export let storageCallbacks = [];
|
|
4
|
+
import {MODULE_TYPE_BIDDER, MODULE_TYPE_CORE} from './activities/modules.js';
|
|
9
5
|
|
|
10
6
|
export const STORAGE_TYPE_LOCALSTORAGE = 'html5';
|
|
11
7
|
export const STORAGE_TYPE_COOKIES = 'cookie';
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
* Storage options
|
|
15
|
-
* @typedef {Object} storageOptions
|
|
16
|
-
* @property {Number=} gvlid - Vendor id
|
|
17
|
-
* @property {string} moduleName? - Module name
|
|
18
|
-
* @property {string=} bidderCode? - Bidder code
|
|
19
|
-
* @property {string=} moduleType - Module type, value can be anyone of core or prebid-module
|
|
20
|
-
*/
|
|
9
|
+
export let storageCallbacks = [];
|
|
21
10
|
|
|
22
|
-
|
|
23
|
-
*
|
|
24
|
-
* All three argument are optional here. Below shows the usage of of these
|
|
25
|
-
* - GVL Id: Pass GVL id if you are a vendor
|
|
26
|
-
* - Bidder code: All bid adapters need to pass bidderCode
|
|
27
|
-
* - Module name: All other modules need to pass module name
|
|
28
|
-
* - Module type: Some modules may need these functions but are not vendor. e.g prebid core files in src and modules like currency.
|
|
29
|
-
* @param {storageOptions} options
|
|
11
|
+
/*
|
|
12
|
+
* Storage manager constructor. Consumers should prefer one of `getStorageManager` or `getCoreStorageManager`.
|
|
30
13
|
*/
|
|
31
|
-
export function newStorageManager({
|
|
14
|
+
export function newStorageManager({moduleName, moduleType} = {}, {bidderSettings = defaultBidderSettings} = {}) {
|
|
32
15
|
function isBidderAllowed(storageType) {
|
|
33
|
-
if (
|
|
16
|
+
if (moduleType !== MODULE_TYPE_BIDDER) {
|
|
34
17
|
return true;
|
|
35
18
|
}
|
|
36
|
-
const storageAllowed = bidderSettings.get(
|
|
19
|
+
const storageAllowed = bidderSettings.get(moduleName, 'storageAllowed');
|
|
37
20
|
if (!storageAllowed || storageAllowed === true) return !!storageAllowed;
|
|
38
21
|
if (Array.isArray(storageAllowed)) return storageAllowed.some((e) => e === storageType);
|
|
39
22
|
return storageAllowed === storageType;
|
|
40
23
|
}
|
|
41
24
|
|
|
42
|
-
if (moduleTypeWhiteList.includes(moduleType)) {
|
|
43
|
-
gvlid = gvlid || VENDORLESS_GVLID;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
25
|
function isValid(cb, storageType) {
|
|
47
26
|
if (!isBidderAllowed(storageType)) {
|
|
48
|
-
logInfo(`bidderSettings denied access to device storage for bidder '${
|
|
27
|
+
logInfo(`bidderSettings denied access to device storage for bidder '${moduleName}'`);
|
|
49
28
|
const result = {valid: false};
|
|
50
29
|
return cb(result);
|
|
51
30
|
} else {
|
|
@@ -53,7 +32,7 @@ export function newStorageManager({gvlid, moduleName, bidderCode, moduleType} =
|
|
|
53
32
|
let hookDetails = {
|
|
54
33
|
hasEnforcementHook: false
|
|
55
34
|
}
|
|
56
|
-
validateStorageEnforcement(
|
|
35
|
+
validateStorageEnforcement(moduleType, moduleName, hookDetails, function(result) {
|
|
57
36
|
if (result && result.hasEnforcementHook) {
|
|
58
37
|
value = cb(result);
|
|
59
38
|
} else {
|
|
@@ -252,31 +231,38 @@ export function newStorageManager({gvlid, moduleName, bidderCode, moduleType} =
|
|
|
252
231
|
/**
|
|
253
232
|
* This hook validates the storage enforcement if gdprEnforcement module is included
|
|
254
233
|
*/
|
|
255
|
-
export const validateStorageEnforcement = hook('async', function(
|
|
234
|
+
export const validateStorageEnforcement = hook('async', function(moduleType, moduleName, hookDetails, callback) {
|
|
256
235
|
callback(hookDetails);
|
|
257
236
|
}, 'validateStorageEnforcement');
|
|
258
237
|
|
|
259
238
|
/**
|
|
260
|
-
*
|
|
261
|
-
*
|
|
239
|
+
* Get a storage manager for a particular module.
|
|
240
|
+
*
|
|
241
|
+
* Either bidderCode or a combination of moduleType + moduleName must be provided. The former is a shorthand
|
|
242
|
+
* for `{moduleType: 'bidder', moduleName: bidderCode}`.
|
|
243
|
+
*
|
|
262
244
|
*/
|
|
263
|
-
export function
|
|
264
|
-
|
|
245
|
+
export function getStorageManager({moduleType, moduleName, bidderCode} = {}) {
|
|
246
|
+
function err() {
|
|
247
|
+
throw new Error(`Invalid invocation for getStorageManager: must set either bidderCode, or moduleType + moduleName`)
|
|
248
|
+
}
|
|
249
|
+
if (bidderCode) {
|
|
250
|
+
if ((moduleType && moduleType !== MODULE_TYPE_BIDDER) || moduleName) err()
|
|
251
|
+
moduleType = MODULE_TYPE_BIDDER;
|
|
252
|
+
moduleName = bidderCode;
|
|
253
|
+
} else if (!moduleName || !moduleType) {
|
|
254
|
+
err()
|
|
255
|
+
}
|
|
256
|
+
return newStorageManager({moduleType, moduleName});
|
|
265
257
|
}
|
|
266
258
|
|
|
267
259
|
/**
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* @param {Number=} gvlid? Vendor id - required for proper GDPR integration
|
|
272
|
-
* @param {string=} bidderCode? - required for bid adapters
|
|
273
|
-
* @param {string=} moduleName? module name
|
|
260
|
+
* Get a storage manager for "core" (vendorless, or first-party) modules. Shorthand for `getStorageManager({moduleName, moduleType: 'core'})`.
|
|
261
|
+
*
|
|
262
|
+
* @param {string} moduleName Module name
|
|
274
263
|
*/
|
|
275
|
-
export function
|
|
276
|
-
|
|
277
|
-
throw new Error('Invalid invocation for getStorageManager')
|
|
278
|
-
}
|
|
279
|
-
return newStorageManager({gvlid, moduleName, bidderCode});
|
|
264
|
+
export function getCoreStorageManager(moduleName) {
|
|
265
|
+
return newStorageManager({moduleName: moduleName, moduleType: MODULE_TYPE_CORE});
|
|
280
266
|
}
|
|
281
267
|
|
|
282
268
|
export function resetData() {
|
package/src/userSync.js
CHANGED
|
@@ -109,10 +109,7 @@ export function newUserSync(userSyncDependencies) {
|
|
|
109
109
|
// Randomize the order of the pixels before firing
|
|
110
110
|
// This is to avoid giving any bidder who has registered multiple syncs
|
|
111
111
|
// any preferential treatment and balancing them out
|
|
112
|
-
shuffle(queue).forEach(
|
|
113
|
-
fn(sync);
|
|
114
|
-
hasFiredBidder.add(sync[0]);
|
|
115
|
-
});
|
|
112
|
+
shuffle(queue).forEach(fn);
|
|
116
113
|
}
|
|
117
114
|
|
|
118
115
|
/**
|
|
@@ -212,6 +209,12 @@ export function newUserSync(userSyncDependencies) {
|
|
|
212
209
|
numAdapterBids = incrementAdapterBids(numAdapterBids, bidder);
|
|
213
210
|
};
|
|
214
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Mark a bidder as done with its user syncs - no more will be accepted from them in this session.
|
|
214
|
+
* @param {string} bidderCode
|
|
215
|
+
*/
|
|
216
|
+
publicApi.bidderDone = hasFiredBidder.add.bind(hasFiredBidder);
|
|
217
|
+
|
|
215
218
|
/**
|
|
216
219
|
* @function shouldBidderBeBlocked
|
|
217
220
|
* @summary Check filterSettings logic to determine if the bidder should be prevented from registering their userSync tracker
|
|
@@ -282,7 +282,7 @@ describe('33acrossIdSystem', () => {
|
|
|
282
282
|
error: 'foo'
|
|
283
283
|
}));
|
|
284
284
|
|
|
285
|
-
expect(logErrorSpy.calledOnceWithExactly(`${thirthyThreeAcrossIdSubmodule.name}: Unsuccessful response`)).to.be.true;
|
|
285
|
+
expect(logErrorSpy.calledOnceWithExactly(`${thirthyThreeAcrossIdSubmodule.name}: Unsuccessful response foo`)).to.be.true;
|
|
286
286
|
|
|
287
287
|
logErrorSpy.restore();
|
|
288
288
|
});
|
|
@@ -684,32 +684,26 @@ describe('Adagio bid adapter', () => {
|
|
|
684
684
|
});
|
|
685
685
|
|
|
686
686
|
describe('with userID modules', function() {
|
|
687
|
-
const
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
687
|
+
const userIdAsEids = [{
|
|
688
|
+
'source': 'pubcid.org',
|
|
689
|
+
'uids': [
|
|
690
|
+
{
|
|
691
|
+
'atype': 1,
|
|
692
|
+
'id': '01EAJWWNEPN3CYMM5N8M5VXY22'
|
|
693
|
+
}
|
|
694
|
+
]
|
|
695
|
+
}];
|
|
691
696
|
|
|
692
697
|
it('should send "user.eids" in the request for Prebid.js supported modules only', function() {
|
|
693
698
|
const bid01 = new BidRequestBuilder({
|
|
694
|
-
|
|
699
|
+
userIdAsEids
|
|
695
700
|
}).withParams().build();
|
|
696
701
|
|
|
697
702
|
const bidderRequest = new BidderRequestBuilder().build();
|
|
698
703
|
|
|
699
704
|
const requests = spec.buildRequests([bid01], bidderRequest);
|
|
700
705
|
|
|
701
|
-
|
|
702
|
-
source: 'pubcid.org',
|
|
703
|
-
uids: [
|
|
704
|
-
{
|
|
705
|
-
atype: 1,
|
|
706
|
-
id: '01EAJWWNEPN3CYMM5N8M5VXY22'
|
|
707
|
-
}
|
|
708
|
-
]
|
|
709
|
-
}];
|
|
710
|
-
|
|
711
|
-
expect(requests[0].data.user.eids).to.have.lengthOf(1);
|
|
712
|
-
expect(requests[0].data.user.eids).to.deep.equal(expected);
|
|
706
|
+
expect(requests[0].data.user.eids).to.deep.equal(userIdAsEids);
|
|
713
707
|
});
|
|
714
708
|
|
|
715
709
|
it('should send an empty "user.eids" array in the request if userId module is unsupported', function() {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {admixerIdSubmodule} from 'modules/admixerIdSystem.js';
|
|
2
2
|
import * as utils from 'src/utils.js';
|
|
3
3
|
import {server} from 'test/mocks/xhr.js';
|
|
4
|
-
import {getStorageManager} from '../../../src/storageManager.js';
|
|
5
|
-
|
|
6
|
-
export const storage = getStorageManager();
|
|
7
4
|
|
|
8
5
|
const pid = '4D393FAC-B6BB-4E19-8396-0A4813607316';
|
|
9
6
|
const getIdParams = {params: {pid: pid}};
|
|
@@ -13,21 +13,21 @@ describe('adnuntiusBidAdapter', function () {
|
|
|
13
13
|
const meta = [{ key: 'usi', value: usi }]
|
|
14
14
|
|
|
15
15
|
before(() => {
|
|
16
|
-
const storage = getStorageManager({ gvlid: GVLID, moduleName: 'adnuntius' })
|
|
17
|
-
storage.setDataInLocalStorage('adn.metaData', JSON.stringify(meta))
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
beforeEach(function () {
|
|
21
16
|
$$PREBID_GLOBAL$$.bidderSettings = {
|
|
22
17
|
adnuntius: {
|
|
23
18
|
storageAllowed: true
|
|
24
19
|
}
|
|
25
20
|
};
|
|
21
|
+
const storage = getStorageManager({ bidderCode: 'adnuntius' })
|
|
22
|
+
storage.setDataInLocalStorage('adn.metaData', JSON.stringify(meta))
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
after(() => {
|
|
26
|
+
$$PREBID_GLOBAL$$.bidderSettings = {};
|
|
26
27
|
});
|
|
27
28
|
|
|
28
29
|
afterEach(function () {
|
|
29
30
|
config.resetConfig();
|
|
30
|
-
$$PREBID_GLOBAL$$.bidderSettings = {};
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
const tzo = new Date().getTimezoneOffset();
|
|
@@ -86,16 +86,16 @@ describe('adrinoBidAdapter', function () {
|
|
|
86
86
|
);
|
|
87
87
|
expect(result.length).to.equal(1);
|
|
88
88
|
expect(result[0].method).to.equal('POST');
|
|
89
|
-
expect(result[0].url).to.equal('https://stg-prebid-bidder.adrino.io/bidder/
|
|
90
|
-
expect(result[0].data.bidId).to.equal('12345678901234');
|
|
91
|
-
expect(result[0].data.placementHash).to.equal('abcdef123456');
|
|
92
|
-
expect(result[0].data.referer).to.equal('http://example.com/');
|
|
93
|
-
expect(result[0].data.userAgent).to.equal(navigator.userAgent);
|
|
94
|
-
expect(result[0].data).to.have.property('nativeParams');
|
|
95
|
-
expect(result[0].data).not.to.have.property('gdprConsent');
|
|
96
|
-
expect(result[0].data).to.have.property('userId');
|
|
97
|
-
expect(result[0].data.userId.criteoId).to.equal('2xqi3F94aHdwWnM3');
|
|
98
|
-
expect(result[0].data.userId.pubcid).to.equal('3ec0b202-7697');
|
|
89
|
+
expect(result[0].url).to.equal('https://stg-prebid-bidder.adrino.io/bidder/bids/');
|
|
90
|
+
expect(result[0].data[0].bidId).to.equal('12345678901234');
|
|
91
|
+
expect(result[0].data[0].placementHash).to.equal('abcdef123456');
|
|
92
|
+
expect(result[0].data[0].referer).to.equal('http://example.com/');
|
|
93
|
+
expect(result[0].data[0].userAgent).to.equal(navigator.userAgent);
|
|
94
|
+
expect(result[0].data[0]).to.have.property('nativeParams');
|
|
95
|
+
expect(result[0].data[0]).not.to.have.property('gdprConsent');
|
|
96
|
+
expect(result[0].data[0]).to.have.property('userId');
|
|
97
|
+
expect(result[0].data[0].userId.criteoId).to.equal('2xqi3F94aHdwWnM3');
|
|
98
|
+
expect(result[0].data[0].userId.pubcid).to.equal('3ec0b202-7697');
|
|
99
99
|
});
|
|
100
100
|
|
|
101
101
|
it('should build the request correctly with gdpr', function () {
|
|
@@ -105,16 +105,16 @@ describe('adrinoBidAdapter', function () {
|
|
|
105
105
|
);
|
|
106
106
|
expect(result.length).to.equal(1);
|
|
107
107
|
expect(result[0].method).to.equal('POST');
|
|
108
|
-
expect(result[0].url).to.equal('https://prd-prebid-bidder.adrino.io/bidder/
|
|
109
|
-
expect(result[0].data.bidId).to.equal('12345678901234');
|
|
110
|
-
expect(result[0].data.placementHash).to.equal('abcdef123456');
|
|
111
|
-
expect(result[0].data.referer).to.equal('http://example.com/');
|
|
112
|
-
expect(result[0].data.userAgent).to.equal(navigator.userAgent);
|
|
113
|
-
expect(result[0].data).to.have.property('nativeParams');
|
|
114
|
-
expect(result[0].data).to.have.property('gdprConsent');
|
|
115
|
-
expect(result[0].data).to.have.property('userId');
|
|
116
|
-
expect(result[0].data.userId.criteoId).to.equal('2xqi3F94aHdwWnM3');
|
|
117
|
-
expect(result[0].data.userId.pubcid).to.equal('3ec0b202-7697');
|
|
108
|
+
expect(result[0].url).to.equal('https://prd-prebid-bidder.adrino.io/bidder/bids/');
|
|
109
|
+
expect(result[0].data[0].bidId).to.equal('12345678901234');
|
|
110
|
+
expect(result[0].data[0].placementHash).to.equal('abcdef123456');
|
|
111
|
+
expect(result[0].data[0].referer).to.equal('http://example.com/');
|
|
112
|
+
expect(result[0].data[0].userAgent).to.equal(navigator.userAgent);
|
|
113
|
+
expect(result[0].data[0]).to.have.property('nativeParams');
|
|
114
|
+
expect(result[0].data[0]).to.have.property('gdprConsent');
|
|
115
|
+
expect(result[0].data[0]).to.have.property('userId');
|
|
116
|
+
expect(result[0].data[0].userId.criteoId).to.equal('2xqi3F94aHdwWnM3');
|
|
117
|
+
expect(result[0].data[0].userId.pubcid).to.equal('3ec0b202-7697');
|
|
118
118
|
});
|
|
119
119
|
|
|
120
120
|
it('should build the request correctly without gdpr', function () {
|
|
@@ -124,22 +124,22 @@ describe('adrinoBidAdapter', function () {
|
|
|
124
124
|
);
|
|
125
125
|
expect(result.length).to.equal(1);
|
|
126
126
|
expect(result[0].method).to.equal('POST');
|
|
127
|
-
expect(result[0].url).to.equal('https://prd-prebid-bidder.adrino.io/bidder/
|
|
128
|
-
expect(result[0].data.bidId).to.equal('12345678901234');
|
|
129
|
-
expect(result[0].data.placementHash).to.equal('abcdef123456');
|
|
130
|
-
expect(result[0].data.referer).to.equal('http://example.com/');
|
|
131
|
-
expect(result[0].data.userAgent).to.equal(navigator.userAgent);
|
|
132
|
-
expect(result[0].data).to.have.property('nativeParams');
|
|
133
|
-
expect(result[0].data).not.to.have.property('gdprConsent');
|
|
134
|
-
expect(result[0].data).to.have.property('userId');
|
|
135
|
-
expect(result[0].data.userId.criteoId).to.equal('2xqi3F94aHdwWnM3');
|
|
136
|
-
expect(result[0].data.userId.pubcid).to.equal('3ec0b202-7697');
|
|
127
|
+
expect(result[0].url).to.equal('https://prd-prebid-bidder.adrino.io/bidder/bids/');
|
|
128
|
+
expect(result[0].data[0].bidId).to.equal('12345678901234');
|
|
129
|
+
expect(result[0].data[0].placementHash).to.equal('abcdef123456');
|
|
130
|
+
expect(result[0].data[0].referer).to.equal('http://example.com/');
|
|
131
|
+
expect(result[0].data[0].userAgent).to.equal(navigator.userAgent);
|
|
132
|
+
expect(result[0].data[0]).to.have.property('nativeParams');
|
|
133
|
+
expect(result[0].data[0]).not.to.have.property('gdprConsent');
|
|
134
|
+
expect(result[0].data[0]).to.have.property('userId');
|
|
135
|
+
expect(result[0].data[0].userId.criteoId).to.equal('2xqi3F94aHdwWnM3');
|
|
136
|
+
expect(result[0].data[0].userId.pubcid).to.equal('3ec0b202-7697');
|
|
137
137
|
});
|
|
138
138
|
});
|
|
139
139
|
|
|
140
140
|
describe('interpretResponse', function () {
|
|
141
141
|
it('should interpret the response correctly', function () {
|
|
142
|
-
const
|
|
142
|
+
const response1 = {
|
|
143
143
|
requestId: '31662c69728811',
|
|
144
144
|
mediaType: 'native',
|
|
145
145
|
cpm: 0.53,
|
|
@@ -167,13 +167,44 @@ describe('adrinoBidAdapter', function () {
|
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
+
const response2 = {
|
|
171
|
+
requestId: '31662c69728812',
|
|
172
|
+
mediaType: 'native',
|
|
173
|
+
cpm: 0.77,
|
|
174
|
+
currency: 'PLN',
|
|
175
|
+
creativeId: '859120',
|
|
176
|
+
netRevenue: true,
|
|
177
|
+
ttl: 600,
|
|
178
|
+
width: 1,
|
|
179
|
+
height: 1,
|
|
180
|
+
noAd: false,
|
|
181
|
+
testAd: false,
|
|
182
|
+
native: {
|
|
183
|
+
title: 'Ad Title',
|
|
184
|
+
body: 'Ad Body',
|
|
185
|
+
image: {
|
|
186
|
+
url: 'http://emisja.contentstream.pl/_/getImageII/?vid=17180728299&typ=cs_300_150&element=IMAGE&scale=1&prefix=adart&nc=1643878278955',
|
|
187
|
+
height: 150,
|
|
188
|
+
width: 300
|
|
189
|
+
},
|
|
190
|
+
clickUrl: 'http://emisja.contentstream.pl/_/ctr2/?u=https%3A%2F%2Fonline.efortuna.pl%2Fpage%3Fkey%3Dej0xMzUzMTM1NiZsPTE1Mjc1MzY1JnA9NTMyOTA%253D&e=znU3tABN8K4N391dmUxYfte5G9tBaDXELJVo1_-kvaTJH2XwWRw77fmfL2YjcEmrbqRQ3M0GcJ0vPWcLtZlsrf8dWrAEHNoZKAC6JMnZF_65IYhTPbQIJ-zn3ac9TU7gEZftFKksH1al7rMuieleVv9r6_DtrOk_oZcYAe4rMRQM-TiWvivJRPBchAAblE0cqyG7rCunJFpal43sxlYm4GvcBJaYHzErn5PXjEzNbd3xHjkdiap-xU9y6BbfkUZ1xIMS8QZLvwNrTXMFCSfSRN2tgVfEj7KyGdLCITHSaFtuIKT2iW2pxC7f2RtPHnzsEPXH0SgAfhA3OxZ5jkQjOZy0PsO7MiCv3sJai5ezUAOjFgayU91ZhI0Y9r2YpB1tTGIjnO23wot8PvRENlThHQ%3D%3D&ref=https%3A%2F%2Fbox.adrino.cloud%2Ftmielcarz%2Fadrino_prebid%2Ftest_page3.html%3Fpbjs_debug%3Dtrue',
|
|
191
|
+
privacyLink: 'https://adrino.pl/wp-content/uploads/2021/01/POLITYKA-PRYWATNOS%CC%81CI-Adrino-Mobile.pdf',
|
|
192
|
+
impressionTrackers: [
|
|
193
|
+
'https://prd-impression-tracker-producer.adrino.io/impression/eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ7XCJpbXByZXNzaW9uSWRcIjpcIjMxNjYyYzY5NzI4ODExXCIsXCJkYXRlXCI6WzIwMjIsMiwzXSxcInBsYWNlbWVudEhhc2hcIjpcIjk0NTVjMDQxYzlkMTI1ZmIwNDE4MWVhMGVlZTJmMmFlXCIsXCJjYW1wYWlnbklkXCI6MTc5MjUsXCJhZHZlcnRpc2VtZW50SWRcIjo5MjA3OSxcInZpc3VhbGlzYXRpb25JZFwiOjg1OTExNSxcImNwbVwiOjUzLjB9IiwiZXhwIjoxNjQzOTE2MjUxLCJpYXQiOjE2NDM5MTU2NTF9.0Y_HvInGl6Xo5xP6rDLC8lzQRGvy-wKe0blk1o8ebWyVRFiUY1JGLUeE0k3sCsPNxgdHAv-o6EcbogpUuqlMJA'
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
170
198
|
const serverResponse = {
|
|
171
|
-
body:
|
|
199
|
+
body: { bidResponses: [response1, response2] }
|
|
172
200
|
};
|
|
173
201
|
|
|
174
202
|
const result = spec.interpretResponse(serverResponse, {});
|
|
175
|
-
expect(result.length).to.equal(
|
|
176
|
-
expect(result[0]).to.equal(
|
|
203
|
+
expect(result.length).to.equal(2);
|
|
204
|
+
expect(result[0]).to.equal(response1);
|
|
205
|
+
expect(result[0].requestId).to.equal('31662c69728811');
|
|
206
|
+
expect(result[1]).to.equal(response2);
|
|
207
|
+
expect(result[1].requestId).to.equal('31662c69728812');
|
|
177
208
|
});
|
|
178
209
|
|
|
179
210
|
it('should return empty array of responses', function () {
|