prebid.js 9.1.0 → 9.3.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/browsers.json +3 -3
- package/dist/33acrossAnalyticsAdapter.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/BTBidAdapter.js +1 -1
- package/dist/acuityadsBidAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adagioRtdProvider.js +1 -1
- package/dist/adagioUtils.js +1 -0
- package/dist/addefendBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/admanBidAdapter.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adpod.js +1 -1
- package/dist/adprimeBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adstirBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/agmaAnalyticsAdapter.js +1 -1
- package/dist/ajaBidAdapter.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/appnexusUtils.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/autoplayDetection.js +1 -1
- package/dist/axisBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/beyondmediaBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bliinkBidAdapter.js +1 -1
- package/dist/boldwinBidAdapter.js +1 -1
- package/dist/bridBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/chunk-core.js +1 -1
- package/dist/compassBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -0
- package/dist/consentManagementGpp.js +1 -1
- package/dist/consentManagementTcf.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/contentexchangeBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/copper6sspBidAdapter.js +1 -0
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dailymotionBidAdapter.js +1 -1
- package/dist/dependencies.json +96 -6
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/dxkultureBidAdapter.js +1 -1
- package/dist/e_volutionBidAdapter.js +1 -1
- package/dist/emtvBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/exadsBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/globalsunBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/illuminBidAdapter.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqIdSystem.js +1 -1
- package/dist/iqzoneBidAdapter.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/kimberliteBidAdapter.js +1 -1
- package/dist/kiviadsBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/krushmediaBidAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentIdSystem.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/loyalBidAdapter.js +1 -1
- package/dist/luceadBidAdapter.js +1 -1
- package/dist/lunamediahbBidAdapter.js +1 -1
- package/dist/mabidderBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mathildeadsBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/medianetAnalyticsAdapter.js +1 -1
- package/dist/medianetBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/mgidXBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/missenaBidAdapter.js +1 -1
- package/dist/mobfoxpbBidAdapter.js +1 -1
- package/dist/mobianRtdProvider.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/nobidAnalyticsAdapter.js +1 -1
- package/dist/nobidBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +211 -204
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openwebBidAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/orakiBidAdapter.js +1 -0
- package/dist/orbidderBidAdapter.js +1 -1
- package/dist/ortbConverter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/ozoneBidAdapter.js +1 -1
- package/dist/paapi.js +1 -1
- package/dist/pairIdSystem.js +1 -1
- package/dist/pgamsspBidAdapter.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/playdigoBidAdapter.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/pubCircleBidAdapter.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/publirBidAdapter.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/qtBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/raynRtdProvider.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/setupadBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/shinezRtbBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smartyadsBidAdapter.js +1 -1
- package/dist/smartyadsUtils.js +1 -0
- package/dist/smartytechBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/snigelBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stnBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/tagorasBidAdapter.js +1 -1
- package/dist/tappxBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/teqblazeUtils.js +1 -0
- package/dist/terceptAnalyticsAdapter.js +1 -1
- package/dist/themoneytizerBidAdapter.js +1 -1
- package/dist/topicsFpdModule.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/twistDigitalBidAdapter.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/unrulyBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/vidazooUtils.js +1 -0
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visiblemeasuresBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahooAdsBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/yuktamediaAnalyticsAdapter.js +1 -1
- package/integrationExamples/gpt/raynRtdProvider_example.html +1 -0
- package/libraries/adagioUtils/adagioUtils.js +35 -0
- package/libraries/appnexusUtils/anUtils.js +1 -0
- package/libraries/autoplayDetection/autoplay.js +8 -1
- package/libraries/consentManagement/cmUtils.js +38 -0
- package/libraries/ortbConverter/converter.js +1 -1
- package/libraries/smartyadsUtils/getAdUrlByRegion.js +32 -0
- package/libraries/teqblazeUtils/bidderUtils.js +253 -0
- package/libraries/vidazooUtils/bidderUtils.js +481 -0
- package/libraries/vidazooUtils/constants.js +7 -0
- package/modules/.submodules.json +1 -0
- package/modules/acuityadsBidAdapter.js +5 -203
- package/modules/adagioBidAdapter.js +1 -17
- package/modules/adagioRtdProvider.js +41 -51
- package/modules/adagioRtdProvider.md +1 -0
- package/modules/addefendBidAdapter.js +1 -2
- package/modules/adlooxRtdProvider.js +1 -1
- package/modules/admanBidAdapter.js +31 -188
- package/modules/adnuntiusBidAdapter.js +1 -0
- package/modules/adprimeBidAdapter.js +28 -165
- package/modules/adxcgAnalyticsAdapter.js +1 -2
- package/modules/axisBidAdapter.js +33 -165
- package/modules/beyondmediaBidAdapter.js +5 -189
- package/modules/bliinkBidAdapter.js +3 -31
- package/modules/boldwinBidAdapter.js +21 -159
- package/modules/ceeIdSystem.js +1 -1
- package/modules/compassBidAdapter.js +5 -198
- package/modules/consentManagementGpp.js +2 -38
- package/modules/consentManagementTcf.js +7 -38
- package/modules/contentexchangeBidAdapter.js +5 -200
- package/modules/conversantAnalyticsAdapter.js +1 -2
- package/modules/conversantBidAdapter.js +1 -0
- package/modules/copper6sspBidAdapter.js +19 -0
- package/modules/copper6sspBidAdapter.md +79 -0
- package/modules/criteoBidAdapter.js +10 -3
- package/modules/e_volutionBidAdapter.js +4 -186
- package/modules/emtvBidAdapter.js +5 -198
- package/modules/globalsunBidAdapter.js +5 -199
- package/modules/id5AnalyticsAdapter.js +1 -2
- package/modules/id5IdSystem.js +31 -2
- package/modules/id5IdSystem.md +67 -2
- package/modules/intentIqIdSystem.js +408 -50
- package/modules/intentIqIdSystem.md +92 -0
- package/modules/iqzoneBidAdapter.js +5 -224
- package/modules/kiviadsBidAdapter.js +5 -199
- package/modules/krushmediaBidAdapter.js +25 -143
- package/modules/liveIntentIdSystem.js +2 -2
- package/modules/loyalBidAdapter.js +4 -178
- package/modules/lunamediahbBidAdapter.js +5 -118
- package/modules/mabidderBidAdapter.js +1 -2
- package/modules/mathildeadsBidAdapter.js +5 -198
- package/modules/medianetAnalyticsAdapter.js +1 -2
- package/modules/medianetBidAdapter.js +1 -1
- package/modules/mgidXBidAdapter.js +14 -207
- package/modules/mobfoxpbBidAdapter.js +4 -135
- package/modules/mobianRtdProvider.js +2 -2
- package/modules/nobidAnalyticsAdapter.js +2 -3
- package/modules/orakiBidAdapter.js +19 -0
- package/modules/orakiBidAdapter.md +79 -0
- package/modules/orbidderBidAdapter.js +4 -2
- package/modules/ozoneBidAdapter.js +117 -58
- package/modules/paapi.js +2 -1
- package/modules/pairIdSystem.js +27 -10
- package/modules/pgamsspBidAdapter.js +5 -240
- package/modules/pixfutureBidAdapter.js +1 -2
- package/modules/playdigoBidAdapter.js +4 -186
- package/modules/prebidServerBidAdapter/index.js +10 -3
- package/modules/pubCircleBidAdapter.js +5 -218
- package/modules/pubmaticAnalyticsAdapter.js +21 -8
- package/modules/pubxaiAnalyticsAdapter.js +1 -5
- package/modules/qtBidAdapter.js +5 -224
- package/modules/raynRtdProvider.js +36 -3
- package/modules/seedtagBidAdapter.js +5 -0
- package/modules/setupadBidAdapter.js +58 -140
- package/modules/smartadserverBidAdapter.js +3 -0
- package/modules/smartyadsBidAdapter.js +6 -110
- package/modules/smartytechBidAdapter.js +7 -2
- package/modules/snigelBidAdapter.js +1 -2
- package/modules/tappxBidAdapter.js +1 -2
- package/modules/terceptAnalyticsAdapter.js +1 -2
- package/modules/topicsFpdModule.js +1 -1
- package/modules/twistDigitalBidAdapter.js +1 -12
- package/modules/uid2IdSystem.js +0 -1
- package/modules/uid2IdSystem_shared.js +0 -1
- package/modules/userId/index.js +31 -21
- package/modules/vidazooBidAdapter.js +26 -468
- package/modules/visiblemeasuresBidAdapter.js +5 -199
- package/modules/yahooAdsBidAdapter.js +4 -1
- package/modules/yuktamediaAnalyticsAdapter.js +1 -2
- package/package.json +1 -1
- package/src/auction.js +5 -63
- package/src/utils/focusTimeout.js +41 -0
- package/src/utils/ttlCollection.js +2 -1
- package/src/utils.js +42 -0
- package/src/videoCache.js +72 -0
- package/test/mocks/videoCacheStub.js +1 -1
- package/test/spec/auctionmanager_spec.js +16 -1
- package/test/spec/fpd/gdpr_spec.js +24 -2
- package/test/spec/libraries/teqblazeUtils/bidderUtils_spec.js +519 -0
- package/test/spec/modules/acuityadsBidAdapter_spec.js +79 -43
- package/test/spec/modules/adagioRtdProvider_spec.js +62 -1
- package/test/spec/modules/admanBidAdapter_spec.js +370 -247
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +6 -3
- package/test/spec/modules/adprimeBidAdapter_spec.js +225 -78
- package/test/spec/modules/axisBidAdapter_spec.js +78 -14
- package/test/spec/modules/beyondmediaBidAdapter_spec.js +80 -18
- package/test/spec/modules/bliinkBidAdapter_spec.js +8 -2
- package/test/spec/modules/boldwinBidAdapter_spec.js +221 -75
- package/test/spec/modules/compassBidAdapter_spec.js +130 -16
- package/test/spec/modules/contentexchangeBidAdapter_spec.js +134 -21
- package/test/spec/modules/conversantAnalyticsAdapter_spec.js +1 -1
- package/test/spec/modules/conversantBidAdapter_spec.js +7 -0
- package/test/spec/modules/copper6sspBidAdapter_spec.js +514 -0
- package/test/spec/modules/e_volutionBidAdapter_spec.js +65 -3
- package/test/spec/modules/emtvBidAdapter_spec.js +131 -16
- package/test/spec/modules/globalsunBidAdapter_spec.js +130 -16
- package/test/spec/modules/id5IdSystem_spec.js +79 -3
- package/test/spec/modules/intentIqIdSystem_spec.js +264 -36
- package/test/spec/modules/iqzoneBidAdapter_spec.js +66 -12
- package/test/spec/modules/kiviadsBidAdapter_spec.js +131 -20
- package/test/spec/modules/krushmediaBidAdapter_spec.js +272 -90
- package/test/spec/modules/loyalBidAdapter_spec.js +114 -14
- package/test/spec/modules/lunamediahbBidAdapter_spec.js +221 -87
- package/test/spec/modules/mathildeadsBidAdapter_spec.js +87 -18
- package/test/spec/modules/mgidXBidAdapter_spec.js +11 -3
- package/test/spec/modules/mobfoxpbBidAdapter_spec.js +229 -91
- package/test/spec/modules/orakiBidAdapter_spec.js +510 -0
- package/test/spec/modules/ozoneBidAdapter_spec.js +192 -22
- package/test/spec/modules/paapi_spec.js +5 -5
- package/test/spec/modules/pgamsspBidAdapter_spec.js +83 -16
- package/test/spec/modules/playdigoBidAdapter_spec.js +38 -9
- package/test/spec/modules/prebidServerBidAdapter_spec.js +14 -0
- package/test/spec/modules/pubCircleBidAdapter_spec.js +82 -17
- package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +52 -5
- package/test/spec/modules/qtBidAdapter_spec.js +15 -3
- package/test/spec/modules/raynRtdProvider_spec.js +25 -0
- package/test/spec/modules/seedtagBidAdapter_spec.js +29 -0
- package/test/spec/modules/setupadBidAdapter_spec.js +124 -97
- package/test/spec/modules/smartadserverBidAdapter_spec.js +7 -0
- package/test/spec/modules/smartyadsBidAdapter_spec.js +6 -83
- package/test/spec/modules/smartytechBidAdapter_spec.js +5 -1
- package/test/spec/modules/topicsFpdModule_spec.js +43 -59
- package/test/spec/modules/twistDigitalBidAdapter_spec.js +5 -3
- package/test/spec/modules/userId_spec.js +86 -47
- package/test/spec/modules/vidazooBidAdapter_spec.js +21 -23
- package/test/spec/modules/visiblemeasuresBidAdapter_spec.js +130 -16
- package/test/spec/modules/yahooAdsBidAdapter_spec.js +1 -1
- package/test/spec/ortbConverter/converter_spec.js +7 -3
- package/test/spec/unit/utils/focusTimeout_spec.js +60 -0
- package/test/spec/videoCache_spec.js +56 -53
|
@@ -1,213 +1,19 @@
|
|
|
1
|
-
import { isFn, deepAccess, logMessage, logError } from '../src/utils.js';
|
|
2
|
-
import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
|
|
3
|
-
|
|
4
1
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
5
2
|
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
|
|
6
|
-
import {
|
|
3
|
+
import { isBidRequestValid, buildRequests, interpretResponse, getUserSyncs } from '../libraries/teqblazeUtils/bidderUtils.js';
|
|
7
4
|
|
|
8
5
|
const BIDDER_CODE = 'globalsun';
|
|
9
6
|
const AD_URL = 'https://endpoint.globalsun.io/pbjs';
|
|
10
7
|
const SYNC_URL = 'https://cs.globalsun.io';
|
|
11
8
|
|
|
12
|
-
function isBidResponseValid(bid) {
|
|
13
|
-
if (!bid.requestId || !bid.cpm || !bid.creativeId || !bid.ttl || !bid.currency) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
switch (bid.mediaType) {
|
|
18
|
-
case BANNER:
|
|
19
|
-
return Boolean(bid.width && bid.height && bid.ad);
|
|
20
|
-
case VIDEO:
|
|
21
|
-
return Boolean(bid.vastUrl || bid.vastXml);
|
|
22
|
-
case NATIVE:
|
|
23
|
-
return Boolean(bid.native && bid.native.impressionTrackers && bid.native.impressionTrackers.length);
|
|
24
|
-
default:
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function getPlacementReqData(bid) {
|
|
30
|
-
const { params, bidId, mediaTypes } = bid;
|
|
31
|
-
const schain = bid.schain || {};
|
|
32
|
-
const { placementId, endpointId } = params;
|
|
33
|
-
const bidfloor = getBidFloor(bid);
|
|
34
|
-
|
|
35
|
-
const placement = {
|
|
36
|
-
bidId,
|
|
37
|
-
schain,
|
|
38
|
-
bidfloor
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
if (placementId) {
|
|
42
|
-
placement.placementId = placementId;
|
|
43
|
-
placement.type = 'publisher';
|
|
44
|
-
} else if (endpointId) {
|
|
45
|
-
placement.endpointId = endpointId;
|
|
46
|
-
placement.type = 'network';
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (mediaTypes && mediaTypes[BANNER]) {
|
|
50
|
-
placement.adFormat = BANNER;
|
|
51
|
-
placement.sizes = mediaTypes[BANNER].sizes;
|
|
52
|
-
} else if (mediaTypes && mediaTypes[VIDEO]) {
|
|
53
|
-
placement.adFormat = VIDEO;
|
|
54
|
-
placement.playerSize = mediaTypes[VIDEO].playerSize;
|
|
55
|
-
placement.minduration = mediaTypes[VIDEO].minduration;
|
|
56
|
-
placement.maxduration = mediaTypes[VIDEO].maxduration;
|
|
57
|
-
placement.mimes = mediaTypes[VIDEO].mimes;
|
|
58
|
-
placement.protocols = mediaTypes[VIDEO].protocols;
|
|
59
|
-
placement.startdelay = mediaTypes[VIDEO].startdelay;
|
|
60
|
-
placement.placement = mediaTypes[VIDEO].placement;
|
|
61
|
-
placement.plcmt = mediaTypes[VIDEO].plcmt;
|
|
62
|
-
placement.skip = mediaTypes[VIDEO].skip;
|
|
63
|
-
placement.skipafter = mediaTypes[VIDEO].skipafter;
|
|
64
|
-
placement.minbitrate = mediaTypes[VIDEO].minbitrate;
|
|
65
|
-
placement.maxbitrate = mediaTypes[VIDEO].maxbitrate;
|
|
66
|
-
placement.delivery = mediaTypes[VIDEO].delivery;
|
|
67
|
-
placement.playbackmethod = mediaTypes[VIDEO].playbackmethod;
|
|
68
|
-
placement.api = mediaTypes[VIDEO].api;
|
|
69
|
-
placement.linearity = mediaTypes[VIDEO].linearity;
|
|
70
|
-
} else if (mediaTypes && mediaTypes[NATIVE]) {
|
|
71
|
-
placement.native = mediaTypes[NATIVE];
|
|
72
|
-
placement.adFormat = NATIVE;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return placement;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function getBidFloor(bid) {
|
|
79
|
-
if (!isFn(bid.getFloor)) {
|
|
80
|
-
return deepAccess(bid, 'params.bidfloor', 0);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
try {
|
|
84
|
-
const bidFloor = bid.getFloor({
|
|
85
|
-
currency: 'USD',
|
|
86
|
-
mediaType: '*',
|
|
87
|
-
size: '*',
|
|
88
|
-
});
|
|
89
|
-
return bidFloor.floor;
|
|
90
|
-
} catch (err) {
|
|
91
|
-
logError(err);
|
|
92
|
-
return 0;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
9
|
export const spec = {
|
|
97
10
|
code: BIDDER_CODE,
|
|
98
11
|
supportedMediaTypes: [BANNER, VIDEO, NATIVE],
|
|
99
12
|
|
|
100
|
-
isBidRequestValid: (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (mediaTypes && mediaTypes[BANNER]) {
|
|
105
|
-
valid = valid && Boolean(mediaTypes[BANNER] && mediaTypes[BANNER].sizes);
|
|
106
|
-
} else if (mediaTypes && mediaTypes[VIDEO]) {
|
|
107
|
-
valid = valid && Boolean(mediaTypes[VIDEO] && mediaTypes[VIDEO].playerSize);
|
|
108
|
-
} else if (mediaTypes && mediaTypes[NATIVE]) {
|
|
109
|
-
valid = valid && Boolean(mediaTypes[NATIVE]);
|
|
110
|
-
} else {
|
|
111
|
-
valid = false;
|
|
112
|
-
}
|
|
113
|
-
return valid;
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
buildRequests: (validBidRequests = [], bidderRequest = {}) => {
|
|
117
|
-
// convert Native ORTB definition to old-style prebid native definition
|
|
118
|
-
validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);
|
|
119
|
-
|
|
120
|
-
let deviceWidth = 0;
|
|
121
|
-
let deviceHeight = 0;
|
|
122
|
-
|
|
123
|
-
let winLocation;
|
|
124
|
-
try {
|
|
125
|
-
const winTop = window.top;
|
|
126
|
-
deviceWidth = winTop.screen.width;
|
|
127
|
-
deviceHeight = winTop.screen.height;
|
|
128
|
-
winLocation = winTop.location;
|
|
129
|
-
} catch (e) {
|
|
130
|
-
logMessage(e);
|
|
131
|
-
winLocation = window.location;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const refferUrl = bidderRequest.refererInfo && bidderRequest.refererInfo.page;
|
|
135
|
-
let refferLocation;
|
|
136
|
-
try {
|
|
137
|
-
refferLocation = refferUrl && new URL(refferUrl);
|
|
138
|
-
} catch (e) {
|
|
139
|
-
logMessage(e);
|
|
140
|
-
}
|
|
141
|
-
// TODO: does the fallback make sense here?
|
|
142
|
-
let location = refferLocation || winLocation;
|
|
143
|
-
const language = (navigator && navigator.language) ? navigator.language.split('-')[0] : '';
|
|
144
|
-
const host = location.host;
|
|
145
|
-
const page = location.pathname;
|
|
146
|
-
const secure = location.protocol === 'https:' ? 1 : 0;
|
|
147
|
-
const placements = [];
|
|
148
|
-
const request = {
|
|
149
|
-
deviceWidth,
|
|
150
|
-
deviceHeight,
|
|
151
|
-
language,
|
|
152
|
-
secure,
|
|
153
|
-
host,
|
|
154
|
-
page,
|
|
155
|
-
placements,
|
|
156
|
-
coppa: config.getConfig('coppa') === true ? 1 : 0,
|
|
157
|
-
ccpa: bidderRequest.uspConsent || undefined,
|
|
158
|
-
gdpr: bidderRequest.gdprConsent || undefined,
|
|
159
|
-
tmax: bidderRequest.timeout
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
const len = validBidRequests.length;
|
|
163
|
-
for (let i = 0; i < len; i++) {
|
|
164
|
-
const bid = validBidRequests[i];
|
|
165
|
-
placements.push(getPlacementReqData(bid));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return {
|
|
169
|
-
method: 'POST',
|
|
170
|
-
url: AD_URL,
|
|
171
|
-
data: request
|
|
172
|
-
};
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
interpretResponse: (serverResponse) => {
|
|
176
|
-
let response = [];
|
|
177
|
-
for (let i = 0; i < serverResponse.body.length; i++) {
|
|
178
|
-
let resItem = serverResponse.body[i];
|
|
179
|
-
if (isBidResponseValid(resItem)) {
|
|
180
|
-
const advertiserDomains = resItem.adomain && resItem.adomain.length ? resItem.adomain : [];
|
|
181
|
-
resItem.meta = { ...resItem.meta, advertiserDomains };
|
|
182
|
-
|
|
183
|
-
response.push(resItem);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
return response;
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
getUserSyncs: (syncOptions, serverResponses, gdprConsent, uspConsent) => {
|
|
190
|
-
let syncType = syncOptions.iframeEnabled ? 'iframe' : 'image';
|
|
191
|
-
let syncUrl = SYNC_URL + `/${syncType}?pbjs=1`;
|
|
192
|
-
if (gdprConsent && gdprConsent.consentString) {
|
|
193
|
-
if (typeof gdprConsent.gdprApplies === 'boolean') {
|
|
194
|
-
syncUrl += `&gdpr=${Number(gdprConsent.gdprApplies)}&gdpr_consent=${gdprConsent.consentString}`;
|
|
195
|
-
} else {
|
|
196
|
-
syncUrl += `&gdpr=0&gdpr_consent=${gdprConsent.consentString}`;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
if (uspConsent && uspConsent.consentString) {
|
|
200
|
-
syncUrl += `&ccpa_consent=${uspConsent.consentString}`;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
const coppa = config.getConfig('coppa') ? 1 : 0;
|
|
204
|
-
syncUrl += `&coppa=${coppa}`;
|
|
205
|
-
|
|
206
|
-
return [{
|
|
207
|
-
type: syncType,
|
|
208
|
-
url: syncUrl
|
|
209
|
-
}];
|
|
210
|
-
}
|
|
13
|
+
isBidRequestValid: isBidRequestValid(),
|
|
14
|
+
buildRequests: buildRequests(AD_URL),
|
|
15
|
+
interpretResponse,
|
|
16
|
+
getUserSyncs: getUserSyncs(SYNC_URL)
|
|
211
17
|
};
|
|
212
18
|
|
|
213
19
|
registerBidder(spec);
|
|
@@ -4,7 +4,6 @@ import adapterManager from '../src/adapterManager.js';
|
|
|
4
4
|
import { ajax } from '../src/ajax.js';
|
|
5
5
|
import { logInfo, logError } from '../src/utils.js';
|
|
6
6
|
import * as events from '../src/events.js';
|
|
7
|
-
import {getGlobal} from '../src/prebidGlobal.js';
|
|
8
7
|
|
|
9
8
|
const {
|
|
10
9
|
AUCTION_END,
|
|
@@ -33,7 +32,7 @@ const FLUSH_EVENTS = [
|
|
|
33
32
|
|
|
34
33
|
const CONFIG_URL_PREFIX = 'https://api.id5-sync.com/analytics'
|
|
35
34
|
const TZ = new Date().getTimezoneOffset();
|
|
36
|
-
const PBJS_VERSION =
|
|
35
|
+
const PBJS_VERSION = 'v' + '$prebid.version$';
|
|
37
36
|
const ID5_REDACTED = '__ID5_REDACTED__';
|
|
38
37
|
const isArray = Array.isArray;
|
|
39
38
|
|
package/modules/id5IdSystem.js
CHANGED
|
@@ -41,6 +41,7 @@ const LOCAL_STORAGE = 'html5';
|
|
|
41
41
|
const LOG_PREFIX = 'User ID - ID5 submodule: ';
|
|
42
42
|
const ID5_API_CONFIG_URL = 'https://id5-sync.com/api/config/prebid';
|
|
43
43
|
const ID5_DOMAIN = 'id5-sync.com';
|
|
44
|
+
const TRUE_LINK_SOURCE = 'true-link-id5-sync.com';
|
|
44
45
|
|
|
45
46
|
// order the legacy cookie names in reverse priority order so the last
|
|
46
47
|
// cookie in the array is the most preferred to use
|
|
@@ -134,12 +135,13 @@ export const id5IdSubmodule = {
|
|
|
134
135
|
* @returns {(Object|undefined)}
|
|
135
136
|
*/
|
|
136
137
|
decode(value, config) {
|
|
137
|
-
let universalUid;
|
|
138
|
+
let universalUid, publisherTrueLinkId;
|
|
138
139
|
let ext = {};
|
|
139
140
|
|
|
140
141
|
if (value && typeof value.universal_uid === 'string') {
|
|
141
142
|
universalUid = value.universal_uid;
|
|
142
143
|
ext = value.ext || ext;
|
|
144
|
+
publisherTrueLinkId = value.publisherTrueLinkId;
|
|
143
145
|
} else {
|
|
144
146
|
return undefined;
|
|
145
147
|
}
|
|
@@ -159,6 +161,12 @@ export const id5IdSubmodule = {
|
|
|
159
161
|
};
|
|
160
162
|
}
|
|
161
163
|
|
|
164
|
+
if (publisherTrueLinkId) {
|
|
165
|
+
responseObj.trueLinkId = {
|
|
166
|
+
uid: publisherTrueLinkId,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
162
170
|
const abTestingResult = deepAccess(value, 'ab_testing.result');
|
|
163
171
|
switch (abTestingResult) {
|
|
164
172
|
case 'control':
|
|
@@ -263,7 +271,22 @@ export const id5IdSubmodule = {
|
|
|
263
271
|
return data.ext;
|
|
264
272
|
}
|
|
265
273
|
}
|
|
274
|
+
},
|
|
275
|
+
'trueLinkId': {
|
|
276
|
+
getValue: function (data) {
|
|
277
|
+
return data.uid;
|
|
278
|
+
},
|
|
279
|
+
getSource: function (data) {
|
|
280
|
+
return TRUE_LINK_SOURCE;
|
|
281
|
+
},
|
|
282
|
+
atype: 1,
|
|
283
|
+
getUidExt: function (data) {
|
|
284
|
+
if (data.ext) {
|
|
285
|
+
return data.ext;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
266
288
|
}
|
|
289
|
+
|
|
267
290
|
}
|
|
268
291
|
};
|
|
269
292
|
|
|
@@ -380,6 +403,8 @@ export class IdFetchFlow {
|
|
|
380
403
|
const referer = getRefererInfo();
|
|
381
404
|
const signature = (this.cacheIdObj && this.cacheIdObj.signature) ? this.cacheIdObj.signature : getLegacyCookieSignature();
|
|
382
405
|
const nbPage = incrementAndResetNb(params.partner);
|
|
406
|
+
const trueLinkInfo = window.id5Bootstrap ? window.id5Bootstrap.getTrueLinkInfo() : {booted: false};
|
|
407
|
+
|
|
383
408
|
const data = {
|
|
384
409
|
'partner': params.partner,
|
|
385
410
|
'gdpr': hasGdpr,
|
|
@@ -392,7 +417,8 @@ export class IdFetchFlow {
|
|
|
392
417
|
'u': referer.stack[0] || window.location.href,
|
|
393
418
|
'v': '$prebid.version$',
|
|
394
419
|
'storage': this.submoduleConfig.storage,
|
|
395
|
-
'localStorage': storage.localStorageIsEnabled() ? 1 : 0
|
|
420
|
+
'localStorage': storage.localStorageIsEnabled() ? 1 : 0,
|
|
421
|
+
'true_link': trueLinkInfo
|
|
396
422
|
};
|
|
397
423
|
|
|
398
424
|
// pass in optional data, but only if populated
|
|
@@ -431,6 +457,9 @@ export class IdFetchFlow {
|
|
|
431
457
|
try {
|
|
432
458
|
if (fetchCallResponse.privacy) {
|
|
433
459
|
storeInLocalStorage(ID5_PRIVACY_STORAGE_NAME, JSON.stringify(fetchCallResponse.privacy), NB_EXP_DAYS);
|
|
460
|
+
if (window.id5Bootstrap && window.id5Bootstrap.setPrivacy) {
|
|
461
|
+
window.id5Bootstrap.setPrivacy(fetchCallResponse.privacy);
|
|
462
|
+
}
|
|
434
463
|
}
|
|
435
464
|
} catch (error) {
|
|
436
465
|
logError(LOG_PREFIX + 'Error while writing privacy info into local storage.', error);
|
package/modules/id5IdSystem.md
CHANGED
|
@@ -37,7 +37,7 @@ pbjs.setConfig({
|
|
|
37
37
|
type: 'html5', // "html5" is the required storage type
|
|
38
38
|
name: 'id5id', // "id5id" is the required storage name
|
|
39
39
|
expires: 90, // storage lasts for 90 days
|
|
40
|
-
refreshInSeconds:
|
|
40
|
+
refreshInSeconds: 7200 // refresh ID every 2 hours to ensure it's fresh
|
|
41
41
|
}
|
|
42
42
|
}],
|
|
43
43
|
auctionDelay: 50 // 50ms maximum auction delay, applies to all userId modules
|
|
@@ -61,7 +61,7 @@ pbjs.setConfig({
|
|
|
61
61
|
| storage.type | Required | String | This is where the results of the user ID will be stored. ID5 **requires** `"html5"`. | `"html5"` |
|
|
62
62
|
| storage.name | Required | String | The name of the local storage where the user ID will be stored. ID5 **requires** `"id5id"`. | `"id5id"` |
|
|
63
63
|
| storage.expires | Optional | Integer | How long (in days) the user ID information will be stored. ID5 recommends `90`. | `90` |
|
|
64
|
-
| storage.refreshInSeconds | Optional | Integer | How many seconds until the ID5 ID will be refreshed. ID5 strongly recommends
|
|
64
|
+
| storage.refreshInSeconds | Optional | Integer | How many seconds until the ID5 ID will be refreshed. ID5 strongly recommends 2 hours between refreshes | `7200` |
|
|
65
65
|
|
|
66
66
|
**ATTENTION:** As of Prebid.js v4.14.0, ID5 requires `storage.type` to be `"html5"` and `storage.name` to be `"id5id"`. Using other values will display a warning today, but in an upcoming release, it will prevent the ID5 module from loading. This change is to ensure the ID5 module in Prebid.js interoperates properly with the [ID5 API](https://github.com/id5io/id5-api.js) and to reduce the size of publishers' first-party cookies that are sent to their web servers. If you have any questions, please reach out to us at [prebid@id5.io](mailto:prebid@id5.io).
|
|
67
67
|
|
|
@@ -73,3 +73,68 @@ To turn on A/B Testing, simply edit the configuration (see above table) to enabl
|
|
|
73
73
|
|
|
74
74
|
### A Note on Using Multiple Wrappers
|
|
75
75
|
If you or your monetization partners are deploying multiple Prebid wrappers on your websites, you should make sure you add the ID5 ID User ID module to *every* wrapper. Only the bidders configured in the Prebid wrapper where the ID5 ID User ID module is installed and configured will be able to pick up the ID5 ID. Bidders from other Prebid instances will not be able to pick up the ID5 ID.
|
|
76
|
+
|
|
77
|
+
### Provided eids
|
|
78
|
+
The module provides following eids:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
[
|
|
82
|
+
{
|
|
83
|
+
source: 'id5-sync.com',
|
|
84
|
+
uids: [
|
|
85
|
+
{
|
|
86
|
+
id: 'some-random-id-value',
|
|
87
|
+
atype: 1,
|
|
88
|
+
ext: {
|
|
89
|
+
linkType: 2,
|
|
90
|
+
abTestingControlGroup: false
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
source: 'true-link-id5-sync.com',
|
|
97
|
+
uids: [
|
|
98
|
+
{
|
|
99
|
+
id: 'some-publisher-true-link-id',
|
|
100
|
+
atype: 1
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
source: 'uidapi.com',
|
|
106
|
+
uids: [
|
|
107
|
+
{
|
|
108
|
+
id: 'some-uid2',
|
|
109
|
+
atype: 3,
|
|
110
|
+
ext: {
|
|
111
|
+
provider: 'id5-sync.com'
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The id from `id5-sync.com` should be always present (though the id provided will be '0' in case of no consent or optout)
|
|
120
|
+
|
|
121
|
+
The id from `true-link-id5-sync.com` will be available if the page is integrated with TrueLink (if you are an ID5 partner you can learn more at https://wiki.id5.io/en/identitycloud/retrieve-id5-ids/true-link-integration)
|
|
122
|
+
|
|
123
|
+
The id from `uidapi.com` will be available if the partner that is used in ID5 user module has the EUID2 integration enabled (it has to be enabled on the ID5 side)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Providing TrueLinkId as a Google PPID
|
|
127
|
+
|
|
128
|
+
TrueLinkId can be provided as a PPID - to use, it the `true-link-id5-sync.com` needs to be provided as a ppid source in prebid userSync configuration:
|
|
129
|
+
|
|
130
|
+
```javascript
|
|
131
|
+
pbjs.setConfig({
|
|
132
|
+
userSync: {
|
|
133
|
+
ppid: 'true-link-id5-sync.com',
|
|
134
|
+
userIds: [], //userIds modules should be configured here
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|