prebid.js 7.51.0 → 7.53.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/1plusXRtdProvider.js +1 -1
- 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/adkernelBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adriverIdSystem.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/airgridRtdProvider.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/allowActivities.js +1 -0
- 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/asoBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/beopBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.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/conceptxBidAdapter.js +1 -0
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.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/cwireBidAdapter.js +1 -1
- package/dist/dependencies.json +6 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/eskimiBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -0
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freepassIdSystem.js +1 -0
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/gdprEnforcement.js +1 -1
- package/dist/glimpseBidAdapter.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/growthCodeRtdProvider.js +1 -0
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/ixBidAdapter.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/limelightDigitalBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.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/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +154 -146
- package/dist/objectGuard.js +1 -0
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/oxxionAnalyticsAdapter.js +1 -0
- package/dist/pairIdSystem.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/proxistoreBidAdapter.js +1 -1
- package/dist/publinkIdSystem.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/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/richaudienceBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rtdModule.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/schain.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/sirdataRtdProvider.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/stroeerCoreBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/uid2IdSystem.js +1 -1
- package/dist/uid2IdSystem_shared.js +1 -0
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/viouslyBidAdapter.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/yieldlabBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspBidAdapter.js +1 -1
- package/integrationExamples/gpt/growthcode.html +20 -9
- package/integrationExamples/gpt/userId_example.html +20 -6
- package/libraries/objectGuard/objectGuard.js +108 -0
- package/libraries/objectGuard/ortbGuard.js +88 -0
- package/modules/.submodules.json +3 -1
- package/modules/1plusXRtdProvider.js +31 -60
- package/modules/adagioBidAdapter.js +86 -24
- package/modules/adgenerationBidAdapter.js +14 -5
- package/modules/adkernelBidAdapter.js +2 -2
- package/modules/adriverIdSystem.js +1 -1
- package/modules/airgridRtdProvider.js +11 -12
- package/modules/allowActivities.js +74 -0
- package/modules/asoBidAdapter.js +2 -1
- package/modules/beopBidAdapter.js +6 -0
- package/modules/conceptxBidAdapter.js +70 -0
- package/modules/conceptxBidAdapter.md +36 -0
- package/modules/connectIdSystem.js +89 -13
- package/modules/connectIdSystem.md +4 -7
- package/modules/criteoBidAdapter.js +18 -2
- package/modules/eskimiBidAdapter.js +171 -41
- package/modules/eskimiBidAdapter.md +35 -16
- package/modules/euidIdSystem.js +121 -0
- package/modules/euidIdSystem.md +131 -0
- package/modules/freepassIdSystem.js +61 -0
- package/modules/freepassIdSystem.md +47 -0
- package/modules/gdprEnforcement.js +98 -169
- package/modules/greenbidsAnalyticsAdapter.js +1 -1
- package/modules/growthCodeRtdProvider.js +131 -0
- package/modules/growthCodeRtdProvider.md +55 -0
- package/modules/id5IdSystem.js +3 -5
- package/modules/ixBidAdapter.js +17 -3
- package/modules/limelightDigitalBidAdapter.js +1 -1
- package/modules/logicadBidAdapter.js +14 -1
- package/modules/mediasquareBidAdapter.js +13 -5
- package/modules/nexx360BidAdapter.js +1 -0
- package/modules/oxxionAnalyticsAdapter.js +212 -0
- package/modules/oxxionAnalyticsAdapter.md +33 -0
- package/modules/pairIdSystem.js +16 -11
- package/modules/proxistoreBidAdapter.js +11 -14
- package/modules/richaudienceBidAdapter.js +10 -1
- package/modules/riseBidAdapter.js +1 -1
- package/modules/rtdModule/index.js +12 -1
- package/modules/schain.js +2 -2
- package/modules/sharethroughBidAdapter.js +2 -2
- package/modules/sirdataRtdProvider.js +73 -146
- package/modules/smartadserverBidAdapter.js +5 -0
- package/modules/sovrnBidAdapter.js +4 -1
- package/modules/stroeerCoreBidAdapter.js +55 -6
- package/modules/stvBidAdapter.js +34 -1
- package/modules/uid2IdSystem.js +27 -210
- package/modules/uid2IdSystem.md +104 -23
- package/modules/uid2IdSystem_shared.js +232 -0
- package/modules/undertoneBidAdapter.js +9 -1
- package/modules/userId/eids.js +8 -0
- package/modules/userId/index.js +69 -41
- package/modules/userId/userId.md +2 -1
- package/modules/viouslyBidAdapter.js +2 -2
- package/modules/weboramaRtdProvider.js +25 -95
- package/modules/weboramaRtdProvider.md +4 -4
- package/modules/yahoosspBidAdapter.js +45 -3
- package/modules/yahoosspBidAdapter.md +1 -1
- package/modules/yieldlabBidAdapter.js +23 -14
- package/modules/zeta_global_sspBidAdapter.js +28 -22
- package/package.json +1 -1
- package/src/activities/activities.js +47 -0
- package/src/activities/activityParams.js +8 -0
- package/src/activities/modules.js +1 -1
- package/src/activities/params.js +59 -0
- package/src/activities/redactor.js +157 -0
- package/src/activities/rules.js +95 -0
- package/src/adapterManager.js +45 -8
- package/src/adloader.js +1 -0
- package/src/fpd/rootDomain.js +1 -1
- package/src/prebid.js +1 -1
- package/src/storageManager.js +57 -44
- package/src/userSync.js +35 -18
- package/test/spec/activities/allowActivites_spec.js +138 -0
- package/test/spec/activities/objectGuard_spec.js +144 -0
- package/test/spec/activities/ortbGuard_spec.js +140 -0
- package/test/spec/activities/params_spec.js +25 -0
- package/test/spec/activities/redactor_spec.js +296 -0
- package/test/spec/activities/rules_spec.js +135 -0
- package/test/spec/modules/1plusXRtdProvider_spec.js +98 -149
- package/test/spec/modules/adagioBidAdapter_spec.js +46 -17
- package/test/spec/modules/adgenerationBidAdapter_spec.js +52 -12
- package/test/spec/modules/airgridRtdProvider_spec.js +2 -0
- package/test/spec/modules/beopBidAdapter_spec.js +24 -0
- package/test/spec/modules/conceptxBidAdapter_spec.js +136 -0
- package/test/spec/modules/connectIdSystem_spec.js +291 -23
- package/test/spec/modules/criteoBidAdapter_spec.js +85 -1
- package/test/spec/modules/eids_spec.js +15 -0
- package/test/spec/modules/eskimiBidAdapter_spec.js +264 -112
- package/test/spec/modules/euidIdSystem_spec.js +130 -0
- package/test/spec/modules/freepassIdSystem_spec.js +186 -0
- package/test/spec/modules/gdprEnforcement_spec.js +127 -414
- package/test/spec/modules/growthCodeRtdProvider_spec.js +127 -0
- package/test/spec/modules/id5IdSystem_spec.js +10 -3
- package/test/spec/modules/ixBidAdapter_spec.js +32 -1
- package/test/spec/modules/logicadBidAdapter_spec.js +122 -2
- package/test/spec/modules/mediasquareBidAdapter_spec.js +4 -0
- package/test/spec/modules/oxxionAnalyticsAdapter_spec.js +324 -0
- package/test/spec/modules/pairIdSystem_spec.js +16 -3
- package/test/spec/modules/realTimeDataModule_spec.js +1 -1
- package/test/spec/modules/richaudienceBidAdapter_spec.js +44 -0
- package/test/spec/modules/schain_spec.js +9 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +1 -1
- package/test/spec/modules/sirdataRtdProvider_spec.js +110 -17
- package/test/spec/modules/smartadserverBidAdapter_spec.js +42 -0
- package/test/spec/modules/sovrnBidAdapter_spec.js +13 -0
- package/test/spec/modules/stroeerCoreBidAdapter_spec.js +151 -6
- package/test/spec/modules/stvBidAdapter_spec.js +13 -1
- package/test/spec/modules/uid2IdSystem_helpers.js +70 -0
- package/test/spec/modules/uid2IdSystem_spec.js +131 -86
- package/test/spec/modules/undertoneBidAdapter_spec.js +57 -1
- package/test/spec/modules/userId_spec.js +96 -33
- package/test/spec/modules/weboramaRtdProvider_spec.js +331 -205
- package/test/spec/modules/yahoosspBidAdapter_spec.js +103 -51
- package/test/spec/modules/yieldlabBidAdapter_spec.js +42 -2
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +204 -4
- package/test/spec/unit/core/adapterManager_spec.js +181 -1
- package/test/spec/unit/core/storageManager_spec.js +76 -68
- package/test/spec/unit/pbjs_api_spec.js +15 -25
- package/test/spec/userSync_spec.js +45 -16
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attachIdSystem,
|
|
3
3
|
auctionDelay,
|
|
4
|
-
coreStorage,
|
|
4
|
+
coreStorage, dep,
|
|
5
|
+
findRootDomain,
|
|
5
6
|
init,
|
|
7
|
+
PBJS_USER_ID_OPTOUT_NAME,
|
|
6
8
|
requestBidsHook,
|
|
9
|
+
requestDataDeletion,
|
|
7
10
|
setStoredConsentData,
|
|
8
11
|
setStoredValue,
|
|
9
12
|
setSubmoduleRegistry,
|
|
10
13
|
syncDelay,
|
|
11
|
-
PBJS_USER_ID_OPTOUT_NAME,
|
|
12
|
-
findRootDomain, requestDataDeletion,
|
|
13
14
|
} from 'modules/userId/index.js';
|
|
14
15
|
import {createEidsArray} from 'modules/userId/eids.js';
|
|
15
16
|
import {config} from 'src/config.js';
|
|
16
17
|
import * as utils from 'src/utils.js';
|
|
18
|
+
import {getPrebidInternal} from 'src/utils.js';
|
|
17
19
|
import * as events from 'src/events.js';
|
|
18
20
|
import CONSTANTS from 'src/constants.json';
|
|
19
21
|
import {getGlobal} from 'src/prebidGlobal.js';
|
|
20
|
-
import {
|
|
21
|
-
resetConsentData,
|
|
22
|
-
} from 'modules/consentManagement.js';
|
|
22
|
+
import {resetConsentData, } from 'modules/consentManagement.js';
|
|
23
23
|
import {server} from 'test/mocks/xhr.js';
|
|
24
24
|
import {find} from 'src/polyfill.js';
|
|
25
25
|
import {unifiedIdSubmodule} from 'modules/unifiedIdSystem.js';
|
|
@@ -27,7 +27,10 @@ import {britepoolIdSubmodule} from 'modules/britepoolIdSystem.js';
|
|
|
27
27
|
import {id5IdSubmodule} from 'modules/id5IdSystem.js';
|
|
28
28
|
import {identityLinkSubmodule} from 'modules/identityLinkIdSystem.js';
|
|
29
29
|
import {dmdIdSubmodule} from 'modules/dmdIdSystem.js';
|
|
30
|
-
import {
|
|
30
|
+
import {
|
|
31
|
+
liveIntentIdSubmodule,
|
|
32
|
+
setEventFiredFlag as liveIntentIdSubmoduleDoNotFireEvent
|
|
33
|
+
} from 'modules/liveIntentIdSystem.js';
|
|
31
34
|
import {merkleIdSubmodule} from 'modules/merkleIdSystem.js';
|
|
32
35
|
import {netIdSubmodule} from 'modules/netIdSystem.js';
|
|
33
36
|
import {intentIqIdSubmodule} from 'modules/intentIqIdSystem.js';
|
|
@@ -39,8 +42,8 @@ import {criteoIdSubmodule} from 'modules/criteoIdSystem.js';
|
|
|
39
42
|
import {mwOpenLinkIdSubModule} from 'modules/mwOpenLinkIdSystem.js';
|
|
40
43
|
import {tapadIdSubmodule} from 'modules/tapadIdSystem.js';
|
|
41
44
|
import {tncidSubModule} from 'modules/tncIdSystem.js';
|
|
42
|
-
import {getPrebidInternal} from 'src/utils.js';
|
|
43
45
|
import {uid2IdSubmodule} from 'modules/uid2IdSystem.js';
|
|
46
|
+
import {euidIdSubmodule} from 'modules/euidIdSystem.js';
|
|
44
47
|
import {admixerIdSubmodule} from 'modules/admixerIdSystem.js';
|
|
45
48
|
import {deepintentDpesSubmodule} from 'modules/deepintentDpesIdSystem.js';
|
|
46
49
|
import {amxIdSubmodule} from '../../../modules/amxIdSystem.js';
|
|
@@ -55,6 +58,8 @@ import {getPPID} from '../../../src/adserver.js';
|
|
|
55
58
|
import {uninstall as uninstallGdprEnforcement} from 'modules/gdprEnforcement.js';
|
|
56
59
|
import {GDPR_GVLIDS} from '../../../src/consentHandler.js';
|
|
57
60
|
import {MODULE_TYPE_UID} from '../../../src/activities/modules.js';
|
|
61
|
+
import {ACTIVITY_ENRICH_EIDS} from '../../../src/activities/activities.js';
|
|
62
|
+
import {ACTIVITY_PARAM_COMPONENT_NAME, ACTIVITY_PARAM_COMPONENT_TYPE} from '../../../src/activities/params.js';
|
|
58
63
|
|
|
59
64
|
let assert = require('chai').assert;
|
|
60
65
|
let expect = require('chai').expect;
|
|
@@ -188,8 +193,7 @@ describe('User ID', function () {
|
|
|
188
193
|
mockGpt.disable();
|
|
189
194
|
mockGpt.enable();
|
|
190
195
|
coreStorage.setCookie('pubcid', '', EXPIRED_COOKIE_DATE);
|
|
191
|
-
coreStorage.setCookie('pubcid_alt', 'altpubcid200000', (new Date(Date.now() +
|
|
192
|
-
let origSK = coreStorage.setCookie.bind(coreStorage);
|
|
196
|
+
coreStorage.setCookie('pubcid_alt', 'altpubcid200000', (new Date(Date.now() + 20000).toUTCString()));
|
|
193
197
|
sinon.spy(coreStorage, 'setCookie');
|
|
194
198
|
sinon.stub(utils, 'logWarn');
|
|
195
199
|
});
|
|
@@ -320,10 +324,6 @@ describe('User ID', function () {
|
|
|
320
324
|
});
|
|
321
325
|
});
|
|
322
326
|
});
|
|
323
|
-
// Because the consent cookie doesn't exist yet, we'll have 2 setCookie calls:
|
|
324
|
-
// 1) for the consent cookie
|
|
325
|
-
// 2) from the getId() call that results in a new call to store the results
|
|
326
|
-
expect(coreStorage.setCookie.callCount).to.equal(2);
|
|
327
327
|
});
|
|
328
328
|
});
|
|
329
329
|
|
|
@@ -350,7 +350,6 @@ describe('User ID', function () {
|
|
|
350
350
|
});
|
|
351
351
|
});
|
|
352
352
|
});
|
|
353
|
-
expect(coreStorage.setCookie.callCount).to.equal(2);
|
|
354
353
|
});
|
|
355
354
|
});
|
|
356
355
|
|
|
@@ -870,7 +869,7 @@ describe('User ID', function () {
|
|
|
870
869
|
|
|
871
870
|
it('handles config with no usersync object', function () {
|
|
872
871
|
init(config);
|
|
873
|
-
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
872
|
+
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, euidIdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
874
873
|
config.setConfig({});
|
|
875
874
|
// usersync is undefined, and no logInfo message for 'User ID - usersync config updated'
|
|
876
875
|
expect(typeof utils.logInfo.args[0]).to.equal('undefined');
|
|
@@ -878,14 +877,14 @@ describe('User ID', function () {
|
|
|
878
877
|
|
|
879
878
|
it('handles config with empty usersync object', function () {
|
|
880
879
|
init(config);
|
|
881
|
-
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
880
|
+
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, euidIdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
882
881
|
config.setConfig({userSync: {}});
|
|
883
882
|
expect(typeof utils.logInfo.args[0]).to.equal('undefined');
|
|
884
883
|
});
|
|
885
884
|
|
|
886
885
|
it('handles config with usersync and userIds that are empty objs', function () {
|
|
887
886
|
init(config);
|
|
888
|
-
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
887
|
+
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, euidIdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
889
888
|
config.setConfig({
|
|
890
889
|
userSync: {
|
|
891
890
|
userIds: [{}]
|
|
@@ -896,7 +895,7 @@ describe('User ID', function () {
|
|
|
896
895
|
|
|
897
896
|
it('handles config with usersync and userIds with empty names or that dont match a submodule.name', function () {
|
|
898
897
|
init(config);
|
|
899
|
-
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
898
|
+
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, euidIdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
900
899
|
config.setConfig({
|
|
901
900
|
userSync: {
|
|
902
901
|
userIds: [{
|
|
@@ -913,7 +912,7 @@ describe('User ID', function () {
|
|
|
913
912
|
|
|
914
913
|
it('config with 1 configurations should create 1 submodules', function () {
|
|
915
914
|
init(config);
|
|
916
|
-
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
915
|
+
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, euidIdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
917
916
|
config.setConfig(getConfigMock(['unifiedId', 'unifiedid', 'cookie']));
|
|
918
917
|
|
|
919
918
|
expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 1 submodules');
|
|
@@ -933,9 +932,9 @@ describe('User ID', function () {
|
|
|
933
932
|
expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 1 submodules');
|
|
934
933
|
});
|
|
935
934
|
|
|
936
|
-
it('config with
|
|
935
|
+
it('config with 23 configurations should result in 23 submodules add', function () {
|
|
937
936
|
init(config);
|
|
938
|
-
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, liveIntentIdSubmodule, britepoolIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule, tncidSubModule]);
|
|
937
|
+
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, liveIntentIdSubmodule, britepoolIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, euidIdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule, tncidSubModule]);
|
|
939
938
|
config.setConfig({
|
|
940
939
|
userSync: {
|
|
941
940
|
syncDelay: 0,
|
|
@@ -978,6 +977,8 @@ describe('User ID', function () {
|
|
|
978
977
|
storage: {name: 'tapad_id', type: 'cookie'}
|
|
979
978
|
}, {
|
|
980
979
|
name: 'uid2'
|
|
980
|
+
}, {
|
|
981
|
+
name: 'euid'
|
|
981
982
|
}, {
|
|
982
983
|
name: 'admixerId',
|
|
983
984
|
storage: {name: 'admixerId', type: 'cookie'}
|
|
@@ -1001,12 +1002,12 @@ describe('User ID', function () {
|
|
|
1001
1002
|
}]
|
|
1002
1003
|
}
|
|
1003
1004
|
});
|
|
1004
|
-
expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for
|
|
1005
|
+
expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 23 submodules');
|
|
1005
1006
|
});
|
|
1006
1007
|
|
|
1007
1008
|
it('config syncDelay updates module correctly', function () {
|
|
1008
1009
|
init(config);
|
|
1009
|
-
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
1010
|
+
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, euidIdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
1010
1011
|
config.setConfig({
|
|
1011
1012
|
userSync: {
|
|
1012
1013
|
syncDelay: 99,
|
|
@@ -1021,7 +1022,7 @@ describe('User ID', function () {
|
|
|
1021
1022
|
|
|
1022
1023
|
it('config auctionDelay updates module correctly', function () {
|
|
1023
1024
|
init(config);
|
|
1024
|
-
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
1025
|
+
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, euidIdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
1025
1026
|
config.setConfig({
|
|
1026
1027
|
userSync: {
|
|
1027
1028
|
auctionDelay: 100,
|
|
@@ -1036,7 +1037,7 @@ describe('User ID', function () {
|
|
|
1036
1037
|
|
|
1037
1038
|
it('config auctionDelay defaults to 0 if not a number', function () {
|
|
1038
1039
|
init(config);
|
|
1039
|
-
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
1040
|
+
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, euidIdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
1040
1041
|
config.setConfig({
|
|
1041
1042
|
userSync: {
|
|
1042
1043
|
auctionDelay: '',
|
|
@@ -2369,7 +2370,7 @@ describe('User ID', function () {
|
|
|
2369
2370
|
localStorage.setItem('qid_exp', new Date(Date.now() + 5000).toUTCString())
|
|
2370
2371
|
|
|
2371
2372
|
init(config);
|
|
2372
|
-
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, britepoolIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
2373
|
+
setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, britepoolIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, uid2IdSubmodule, euidIdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]);
|
|
2373
2374
|
|
|
2374
2375
|
config.setConfig({
|
|
2375
2376
|
userSync: {
|
|
@@ -2503,9 +2504,57 @@ describe('User ID', function () {
|
|
|
2503
2504
|
localStorage.removeItem('amxId');
|
|
2504
2505
|
localStorage.removeItem('amxId_exp');
|
|
2505
2506
|
coreStorage.setCookie('kpuid', EXPIRED_COOKIE_DATE);
|
|
2507
|
+
coreStorage.setCookie('__uid2_advertising_token', '', EXPIRED_COOKIE_DATE);
|
|
2506
2508
|
done();
|
|
2507
2509
|
}, {adUnits});
|
|
2508
2510
|
});
|
|
2511
|
+
|
|
2512
|
+
describe('activity controls', () => {
|
|
2513
|
+
let isAllowed;
|
|
2514
|
+
const MOCK_IDS = ['mockId1', 'mockId2']
|
|
2515
|
+
beforeEach(() => {
|
|
2516
|
+
isAllowed = sinon.stub(dep, 'isAllowed');
|
|
2517
|
+
init(config);
|
|
2518
|
+
setSubmoduleRegistry([]);
|
|
2519
|
+
const mods = MOCK_IDS.map((name) => ({
|
|
2520
|
+
name,
|
|
2521
|
+
decode: function (value) {
|
|
2522
|
+
return {
|
|
2523
|
+
[name]: value
|
|
2524
|
+
};
|
|
2525
|
+
},
|
|
2526
|
+
getId: function () {
|
|
2527
|
+
return {id: `${name}Value`};
|
|
2528
|
+
}
|
|
2529
|
+
}));
|
|
2530
|
+
mods.forEach(attachIdSystem);
|
|
2531
|
+
});
|
|
2532
|
+
afterEach(() => {
|
|
2533
|
+
isAllowed.restore();
|
|
2534
|
+
});
|
|
2535
|
+
|
|
2536
|
+
it('should check for enrichEids activity permissions', (done) => {
|
|
2537
|
+
isAllowed.callsFake((activity, params) => {
|
|
2538
|
+
return !(activity === ACTIVITY_ENRICH_EIDS &&
|
|
2539
|
+
params[ACTIVITY_PARAM_COMPONENT_TYPE] === MODULE_TYPE_UID &&
|
|
2540
|
+
params[ACTIVITY_PARAM_COMPONENT_NAME] === MOCK_IDS[0])
|
|
2541
|
+
})
|
|
2542
|
+
|
|
2543
|
+
config.setConfig({
|
|
2544
|
+
userSync: {
|
|
2545
|
+
syncDelay: 0,
|
|
2546
|
+
userIds: MOCK_IDS.map(name => ({
|
|
2547
|
+
name, storage: {name, type: 'cookie'}
|
|
2548
|
+
}))
|
|
2549
|
+
}
|
|
2550
|
+
});
|
|
2551
|
+
requestBidsHook((req) => {
|
|
2552
|
+
const activeIds = req.adUnits.flatMap(au => au.bids).flatMap(bid => Object.keys(bid.userId));
|
|
2553
|
+
expect(Array.from(new Set(activeIds))).to.have.members([MOCK_IDS[1]]);
|
|
2554
|
+
done();
|
|
2555
|
+
}, {adUnits})
|
|
2556
|
+
});
|
|
2557
|
+
})
|
|
2509
2558
|
});
|
|
2510
2559
|
|
|
2511
2560
|
describe('callbacks at the end of auction', function () {
|
|
@@ -2591,15 +2640,21 @@ describe('User ID', function () {
|
|
|
2591
2640
|
});
|
|
2592
2641
|
|
|
2593
2642
|
describe('Set cookie behavior', function () {
|
|
2594
|
-
let
|
|
2643
|
+
let cookie, cookieStub;
|
|
2644
|
+
|
|
2595
2645
|
beforeEach(function () {
|
|
2596
|
-
coreStorageSpy = sinon.spy(coreStorage, 'setCookie');
|
|
2597
2646
|
setSubmoduleRegistry([sharedIdSystemSubmodule]);
|
|
2598
2647
|
init(config);
|
|
2648
|
+
cookie = document.cookie;
|
|
2649
|
+
cookieStub = sinon.stub(document, 'cookie');
|
|
2650
|
+
cookieStub.get(() => cookie);
|
|
2651
|
+
cookieStub.set((val) => cookie = val);
|
|
2599
2652
|
});
|
|
2653
|
+
|
|
2600
2654
|
afterEach(function () {
|
|
2601
|
-
|
|
2655
|
+
cookieStub.restore();
|
|
2602
2656
|
});
|
|
2657
|
+
|
|
2603
2658
|
it('should allow submodules to override the domain', function () {
|
|
2604
2659
|
const submodule = {
|
|
2605
2660
|
submodule: {
|
|
@@ -2608,26 +2663,34 @@ describe('User ID', function () {
|
|
|
2608
2663
|
}
|
|
2609
2664
|
},
|
|
2610
2665
|
config: {
|
|
2666
|
+
name: 'mockId',
|
|
2611
2667
|
storage: {
|
|
2612
2668
|
type: 'cookie'
|
|
2613
2669
|
}
|
|
2670
|
+
},
|
|
2671
|
+
storageMgr: {
|
|
2672
|
+
setCookie: sinon.stub()
|
|
2614
2673
|
}
|
|
2615
2674
|
}
|
|
2616
2675
|
setStoredValue(submodule, 'bar');
|
|
2617
|
-
expect(
|
|
2676
|
+
expect(submodule.storageMgr.setCookie.getCall(0).args[4]).to.equal('foo.com');
|
|
2618
2677
|
});
|
|
2619
2678
|
|
|
2620
|
-
it('should pass
|
|
2679
|
+
it('should pass no domain if submodule does not override the domain', function () {
|
|
2621
2680
|
const submodule = {
|
|
2622
2681
|
submodule: {},
|
|
2623
2682
|
config: {
|
|
2683
|
+
name: 'mockId',
|
|
2624
2684
|
storage: {
|
|
2625
2685
|
type: 'cookie'
|
|
2626
2686
|
}
|
|
2687
|
+
},
|
|
2688
|
+
storageMgr: {
|
|
2689
|
+
setCookie: sinon.stub()
|
|
2627
2690
|
}
|
|
2628
2691
|
}
|
|
2629
2692
|
setStoredValue(submodule, 'bar');
|
|
2630
|
-
expect(
|
|
2693
|
+
expect(submodule.storageMgr.setCookie.getCall(0).args[4]).to.equal(null);
|
|
2631
2694
|
});
|
|
2632
2695
|
});
|
|
2633
2696
|
|