prebid.js 7.52.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.
Files changed (214) hide show
  1. package/dist/1plusXRtdProvider.js +1 -1
  2. package/dist/33acrossBidAdapter.js +1 -1
  3. package/dist/33acrossIdSystem.js +1 -1
  4. package/dist/adagioBidAdapter.js +1 -1
  5. package/dist/adbookpspBidAdapter.js +1 -1
  6. package/dist/adgenerationBidAdapter.js +1 -1
  7. package/dist/adkernelBidAdapter.js +1 -1
  8. package/dist/adqueryBidAdapter.js +1 -1
  9. package/dist/adrelevantisBidAdapter.js +1 -1
  10. package/dist/adtrgtmeBidAdapter.js +1 -1
  11. package/dist/adxcgBidAdapter.js +1 -1
  12. package/dist/adyoulikeBidAdapter.js +1 -1
  13. package/dist/airgridRtdProvider.js +1 -1
  14. package/dist/ajaBidAdapter.js +1 -1
  15. package/dist/amxBidAdapter.js +1 -1
  16. package/dist/amxIdSystem.js +1 -1
  17. package/dist/appierAnalyticsAdapter.js +1 -1
  18. package/dist/appnexusBidAdapter.js +1 -1
  19. package/dist/asoBidAdapter.js +1 -1
  20. package/dist/axonixBidAdapter.js +1 -1
  21. package/dist/beopBidAdapter.js +1 -1
  22. package/dist/bidglassBidAdapter.js +1 -1
  23. package/dist/big-richmediaBidAdapter.js +1 -1
  24. package/dist/bridgewellBidAdapter.js +1 -1
  25. package/dist/brightMountainMediaBidAdapter.js +1 -1
  26. package/dist/carodaBidAdapter.js +1 -1
  27. package/dist/chtnwBidAdapter.js +1 -1
  28. package/dist/conceptxBidAdapter.js +1 -0
  29. package/dist/concertBidAdapter.js +1 -1
  30. package/dist/connectadBidAdapter.js +1 -1
  31. package/dist/consumableBidAdapter.js +1 -1
  32. package/dist/conversantAnalyticsAdapter.js +1 -1
  33. package/dist/conversantBidAdapter.js +1 -1
  34. package/dist/craftBidAdapter.js +1 -1
  35. package/dist/criteoBidAdapter.js +1 -1
  36. package/dist/cwireBidAdapter.js +1 -1
  37. package/dist/dspxBidAdapter.js +1 -1
  38. package/dist/eplanningBidAdapter.js +1 -1
  39. package/dist/eskimiBidAdapter.js +1 -1
  40. package/dist/euidIdSystem.js +1 -0
  41. package/dist/feedadBidAdapter.js +1 -1
  42. package/dist/finativeBidAdapter.js +1 -1
  43. package/dist/freepassIdSystem.js +1 -0
  44. package/dist/freewheel-sspBidAdapter.js +1 -1
  45. package/dist/glimpseBidAdapter.js +1 -1
  46. package/dist/gmosspBidAdapter.js +1 -1
  47. package/dist/goldbachBidAdapter.js +1 -1
  48. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  49. package/dist/greenbidsRtdProvider.js +1 -1
  50. package/dist/gridBidAdapter.js +1 -1
  51. package/dist/gumgumBidAdapter.js +1 -1
  52. package/dist/h12mediaBidAdapter.js +1 -1
  53. package/dist/id5IdSystem.js +1 -1
  54. package/dist/improvedigitalBidAdapter.js +1 -1
  55. package/dist/inmarBidAdapter.js +1 -1
  56. package/dist/insticatorBidAdapter.js +1 -1
  57. package/dist/ixBidAdapter.js +1 -1
  58. package/dist/justpremiumBidAdapter.js +1 -1
  59. package/dist/kargoBidAdapter.js +1 -1
  60. package/dist/konduitAnalyticsAdapter.js +1 -1
  61. package/dist/kueezBidAdapter.js +1 -1
  62. package/dist/kueezRtbBidAdapter.js +1 -1
  63. package/dist/kulturemediaBidAdapter.js +1 -1
  64. package/dist/lassoBidAdapter.js +1 -1
  65. package/dist/lifestreetBidAdapter.js +1 -1
  66. package/dist/limelightDigitalBidAdapter.js +1 -1
  67. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  68. package/dist/logicadBidAdapter.js +1 -1
  69. package/dist/loglyliftBidAdapter.js +1 -1
  70. package/dist/magniteAnalyticsAdapter.js +1 -1
  71. package/dist/malltvAnalyticsAdapter.js +1 -1
  72. package/dist/marsmediaBidAdapter.js +1 -1
  73. package/dist/mediafuseBidAdapter.js +1 -1
  74. package/dist/mediasquareBidAdapter.js +1 -1
  75. package/dist/mgidBidAdapter.js +1 -1
  76. package/dist/minutemediaBidAdapter.js +1 -1
  77. package/dist/minutemediaplusBidAdapter.js +1 -1
  78. package/dist/nexx360BidAdapter.js +1 -1
  79. package/dist/not-for-prod/prebid.js +146 -142
  80. package/dist/oguryBidAdapter.js +1 -1
  81. package/dist/onetagBidAdapter.js +1 -1
  82. package/dist/ooloAnalyticsAdapter.js +1 -1
  83. package/dist/optidigitalBidAdapter.js +1 -1
  84. package/dist/outbrainBidAdapter.js +1 -1
  85. package/dist/pairIdSystem.js +1 -1
  86. package/dist/parrableIdSystem.js +1 -1
  87. package/dist/pixfutureBidAdapter.js +1 -1
  88. package/dist/prebid-core.js +1 -1
  89. package/dist/proxistoreBidAdapter.js +1 -1
  90. package/dist/publinkIdSystem.js +1 -1
  91. package/dist/pubmaticBidAdapter.js +1 -1
  92. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  93. package/dist/pxyzBidAdapter.js +1 -1
  94. package/dist/quantcastBidAdapter.js +1 -1
  95. package/dist/readpeakBidAdapter.js +1 -1
  96. package/dist/relaidoBidAdapter.js +1 -1
  97. package/dist/retailspotBidAdapter.js +1 -1
  98. package/dist/rhythmoneBidAdapter.js +1 -1
  99. package/dist/richaudienceBidAdapter.js +1 -1
  100. package/dist/riseBidAdapter.js +1 -1
  101. package/dist/rubiconAnalyticsAdapter.js +1 -1
  102. package/dist/rubiconBidAdapter.js +1 -1
  103. package/dist/schain.js +1 -1
  104. package/dist/seedingAllianceBidAdapter.js +1 -1
  105. package/dist/seedtagBidAdapter.js +1 -1
  106. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  107. package/dist/sharethroughBidAdapter.js +1 -1
  108. package/dist/shinezBidAdapter.js +1 -1
  109. package/dist/sirdataRtdProvider.js +1 -1
  110. package/dist/smaatoBidAdapter.js +1 -1
  111. package/dist/smartadserverBidAdapter.js +1 -1
  112. package/dist/smartxBidAdapter.js +1 -1
  113. package/dist/smilewantedBidAdapter.js +1 -1
  114. package/dist/sonobiBidAdapter.js +1 -1
  115. package/dist/sovrnAnalyticsAdapter.js +1 -1
  116. package/dist/sovrnBidAdapter.js +1 -1
  117. package/dist/sspBCBidAdapter.js +1 -1
  118. package/dist/stroeerCoreBidAdapter.js +1 -1
  119. package/dist/stvBidAdapter.js +1 -1
  120. package/dist/sublimeBidAdapter.js +1 -1
  121. package/dist/synacormediaBidAdapter.js +1 -1
  122. package/dist/targetVideoBidAdapter.js +1 -1
  123. package/dist/teadsBidAdapter.js +1 -1
  124. package/dist/trionBidAdapter.js +1 -1
  125. package/dist/tripleliftBidAdapter.js +1 -1
  126. package/dist/ttdBidAdapter.js +1 -1
  127. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  128. package/dist/uid2IdSystem.js +1 -1
  129. package/dist/uid2IdSystem_shared.js +1 -0
  130. package/dist/underdogmediaBidAdapter.js +1 -1
  131. package/dist/undertoneBidAdapter.js +1 -1
  132. package/dist/userId.js +1 -1
  133. package/dist/vidazooBidAdapter.js +1 -1
  134. package/dist/videobyteBidAdapter.js +1 -1
  135. package/dist/viouslyBidAdapter.js +1 -1
  136. package/dist/visxBidAdapter.js +1 -1
  137. package/dist/vuukleBidAdapter.js +1 -1
  138. package/dist/weboramaRtdProvider.js +1 -1
  139. package/dist/widespaceBidAdapter.js +1 -1
  140. package/dist/winrBidAdapter.js +1 -1
  141. package/dist/yahoosspBidAdapter.js +1 -1
  142. package/dist/yieldlabBidAdapter.js +1 -1
  143. package/dist/yieldmoBidAdapter.js +1 -1
  144. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  145. package/dist/zeta_global_sspBidAdapter.js +1 -1
  146. package/integrationExamples/gpt/userId_example.html +20 -6
  147. package/modules/.submodules.json +3 -1
  148. package/modules/1plusXRtdProvider.js +31 -60
  149. package/modules/adagioBidAdapter.js +86 -24
  150. package/modules/adkernelBidAdapter.js +2 -2
  151. package/modules/airgridRtdProvider.js +11 -12
  152. package/modules/asoBidAdapter.js +2 -1
  153. package/modules/beopBidAdapter.js +6 -0
  154. package/modules/conceptxBidAdapter.js +70 -0
  155. package/modules/conceptxBidAdapter.md +36 -0
  156. package/modules/criteoBidAdapter.js +9 -2
  157. package/modules/eskimiBidAdapter.js +171 -41
  158. package/modules/eskimiBidAdapter.md +35 -16
  159. package/modules/euidIdSystem.js +121 -0
  160. package/modules/euidIdSystem.md +131 -0
  161. package/modules/freepassIdSystem.js +61 -0
  162. package/modules/freepassIdSystem.md +47 -0
  163. package/modules/greenbidsAnalyticsAdapter.js +1 -1
  164. package/modules/id5IdSystem.js +3 -5
  165. package/modules/ixBidAdapter.js +12 -1
  166. package/modules/limelightDigitalBidAdapter.js +1 -1
  167. package/modules/logicadBidAdapter.js +14 -1
  168. package/modules/mediasquareBidAdapter.js +13 -5
  169. package/modules/nexx360BidAdapter.js +1 -0
  170. package/modules/pairIdSystem.js +10 -5
  171. package/modules/proxistoreBidAdapter.js +11 -14
  172. package/modules/richaudienceBidAdapter.js +10 -1
  173. package/modules/riseBidAdapter.js +1 -1
  174. package/modules/schain.js +2 -2
  175. package/modules/sirdataRtdProvider.js +73 -146
  176. package/modules/sovrnBidAdapter.js +4 -1
  177. package/modules/stroeerCoreBidAdapter.js +55 -6
  178. package/modules/uid2IdSystem.js +27 -210
  179. package/modules/uid2IdSystem.md +104 -23
  180. package/modules/uid2IdSystem_shared.js +232 -0
  181. package/modules/userId/eids.js +8 -0
  182. package/modules/userId/userId.md +2 -1
  183. package/modules/viouslyBidAdapter.js +2 -2
  184. package/modules/weboramaRtdProvider.js +25 -95
  185. package/modules/weboramaRtdProvider.md +4 -4
  186. package/modules/yieldlabBidAdapter.js +23 -14
  187. package/modules/zeta_global_sspBidAdapter.js +27 -22
  188. package/package.json +1 -1
  189. package/src/adloader.js +1 -0
  190. package/test/spec/modules/1plusXRtdProvider_spec.js +98 -149
  191. package/test/spec/modules/adagioBidAdapter_spec.js +46 -17
  192. package/test/spec/modules/airgridRtdProvider_spec.js +2 -0
  193. package/test/spec/modules/beopBidAdapter_spec.js +24 -0
  194. package/test/spec/modules/conceptxBidAdapter_spec.js +136 -0
  195. package/test/spec/modules/criteoBidAdapter_spec.js +1 -1
  196. package/test/spec/modules/eids_spec.js +15 -0
  197. package/test/spec/modules/eskimiBidAdapter_spec.js +264 -112
  198. package/test/spec/modules/euidIdSystem_spec.js +130 -0
  199. package/test/spec/modules/freepassIdSystem_spec.js +186 -0
  200. package/test/spec/modules/id5IdSystem_spec.js +10 -3
  201. package/test/spec/modules/ixBidAdapter_spec.js +30 -0
  202. package/test/spec/modules/logicadBidAdapter_spec.js +122 -2
  203. package/test/spec/modules/mediasquareBidAdapter_spec.js +4 -0
  204. package/test/spec/modules/richaudienceBidAdapter_spec.js +44 -0
  205. package/test/spec/modules/schain_spec.js +9 -0
  206. package/test/spec/modules/sirdataRtdProvider_spec.js +110 -17
  207. package/test/spec/modules/sovrnBidAdapter_spec.js +13 -0
  208. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +151 -6
  209. package/test/spec/modules/uid2IdSystem_helpers.js +70 -0
  210. package/test/spec/modules/uid2IdSystem_spec.js +131 -86
  211. package/test/spec/modules/userId_spec.js +16 -12
  212. package/test/spec/modules/weboramaRtdProvider_spec.js +331 -205
  213. package/test/spec/modules/yieldlabBidAdapter_spec.js +42 -2
  214. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +200 -4
@@ -1,11 +1,15 @@
1
+ /* eslint-disable no-console */
2
+
1
3
  import {coreStorage, init, setSubmoduleRegistry, requestBidsHook} from 'modules/userId/index.js';
2
4
  import {config} from 'src/config.js';
3
5
  import * as utils from 'src/utils.js';
4
6
  import { uid2IdSubmodule } from 'modules/uid2IdSystem.js';
5
7
  import 'src/prebid.js';
8
+ import 'modules/consentManagement.js';
6
9
  import { getGlobal } from 'src/prebidGlobal.js';
7
10
  import { server } from 'test/mocks/xhr.js';
8
11
  import { configureTimerInterceptors } from 'test/mocks/timers.js';
12
+ import { cookieHelpers, runAuction, apiHelpers, setGdprApplies } from './uid2IdSystem_helpers.js';
9
13
  import {hook} from 'src/hook.js';
10
14
  import {uninstall as uninstallGdprEnforcement} from 'modules/gdprEnforcement.js';
11
15
 
@@ -14,72 +18,48 @@ let expect = require('chai').expect;
14
18
  const clearTimersAfterEachTest = true;
15
19
  const debugOutput = () => {};
16
20
 
17
- const expireCookieDate = 'Thu, 01 Jan 1970 00:00:01 GMT';
18
- const msIn12Hours = 60 * 60 * 12 * 1000;
19
21
  const moduleCookieName = '__uid2_advertising_token';
20
22
  const publisherCookieName = '__UID2_SERVER_COOKIE';
21
23
  const auctionDelayMs = 10;
22
- const legacyConfigParams = null;
23
- const serverCookieConfigParams = { uid2ServerCookie: publisherCookieName }
24
- const getFutureCookieExpiry = () => new Date(Date.now() + msIn12Hours).toUTCString();
25
- const setPublisherCookie = (token) => coreStorage.setCookie(publisherCookieName, JSON.stringify(token), getFutureCookieExpiry());
26
-
27
- const makePrebidIdentityContainer = (token) => ({uid2: {id: token}});
28
- const makePrebidConfig = (params = null, extraSettings = {}, debug = false) => ({
29
- userSync: { auctionDelay: auctionDelayMs, userIds: [{name: 'uid2', params}] }, debug, ...extraSettings
30
- });
31
-
32
24
  const initialToken = `initial-advertising-token`;
33
25
  const legacyToken = 'legacy-advertising-token';
34
26
  const refreshedToken = 'refreshed-advertising-token';
35
- const makeUid2Token = (token = initialToken, shouldRefresh = false, expired = false) => ({
36
- advertising_token: token,
37
- refresh_token: 'fake-refresh-token',
38
- identity_expires: expired ? Date.now() - 1000 : Date.now() + 60 * 60 * 1000,
39
- refresh_from: shouldRefresh ? Date.now() - 1000 : Date.now() + 60 * 1000,
40
- refresh_expires: Date.now() + 24 * 60 * 60 * 1000, // 24 hours
41
- refresh_response_key: 'wR5t6HKMfJ2r4J7fEGX9Gw==',
27
+
28
+ const legacyConfigParams = {storage: null};
29
+ const serverCookieConfigParams = { uid2ServerCookie: publisherCookieName };
30
+ const newServerCookieConfigParams = { uid2Cookie: publisherCookieName };
31
+
32
+ const makeUid2IdentityContainer = (token) => ({uid2: {id: token}});
33
+ let useLocalStorage = false;
34
+ const makePrebidConfig = (params = null, extraSettings = {}, debug = false) => ({
35
+ userSync: { auctionDelay: auctionDelayMs, userIds: [{name: 'uid2', params: {storage: useLocalStorage ? 'localStorage' : 'cookie', ...params}}] }, debug, ...extraSettings
42
36
  });
43
- const expectInitialToken = (bid) => expect(bid?.userId ?? {}).to.deep.include(makePrebidIdentityContainer(initialToken));
44
- const expectRefreshedToken = (bid) => expect(bid?.userId ?? {}).to.deep.include(makePrebidIdentityContainer(refreshedToken));
37
+
38
+ const getFromAppropriateStorage = () => {
39
+ if (useLocalStorage) return coreStorage.getDataFromLocalStorage(moduleCookieName);
40
+ else return coreStorage.getCookie(moduleCookieName);
41
+ }
42
+
43
+ const expectToken = (bid, token) => expect(bid?.userId ?? {}).to.deep.include(makeUid2IdentityContainer(token));
44
+ const expectLegacyToken = (bid) => expect(bid.userId).to.deep.include(makeUid2IdentityContainer(legacyToken));
45
45
  const expectNoIdentity = (bid) => expect(bid).to.not.haveOwnProperty('userId');
46
- const expectGlobalToHaveRefreshedIdentity = () => expect(getGlobal().getUserIds()).to.deep.include(makePrebidIdentityContainer(refreshedToken));
46
+ const expectGlobalToHaveToken = (token) => expect(getGlobal().getUserIds()).to.deep.include(makeUid2IdentityContainer(token));
47
47
  const expectGlobalToHaveNoUid2 = () => expect(getGlobal().getUserIds()).to.not.haveOwnProperty('uid2');
48
- const expectLegacyToken = (bid) => expect(bid.userId).to.deep.include(makePrebidIdentityContainer(legacyToken));
49
- const expectNoLegacyToken = (bid) => expect(bid.userId).to.not.deep.include(makePrebidIdentityContainer(legacyToken));
50
- const expectModuleCookieEmptyOrMissing = () => expect(coreStorage.getCookie(moduleCookieName)).to.be.null;
51
- const expectModuleCookieToContain = (initialIdentity, latestIdentity) => {
52
- const cookie = JSON.parse(coreStorage.getCookie(moduleCookieName));
48
+ const expectNoLegacyToken = (bid) => expect(bid.userId).to.not.deep.include(makeUid2IdentityContainer(legacyToken));
49
+ const expectModuleStorageEmptyOrMissing = () => expect(getFromAppropriateStorage()).to.be.null;
50
+ const expectModuleStorageToContain = (initialIdentity, latestIdentity) => {
51
+ const cookie = JSON.parse(getFromAppropriateStorage());
53
52
  if (initialIdentity) expect(cookie.originalToken.advertising_token).to.equal(initialIdentity);
54
53
  if (latestIdentity) expect(cookie.latestToken.advertising_token).to.equal(latestIdentity);
55
54
  }
56
55
 
57
56
  const apiUrl = 'https://prod.uidapi.com/v2/token/refresh';
58
57
  const headers = { 'Content-Type': 'application/json' };
59
- const makeSuccessResponseBody = () => btoa(JSON.stringify({ status: 'success', body: { ...makeUid2Token(), advertising_token: refreshedToken } }));
58
+ const makeSuccessResponseBody = () => btoa(JSON.stringify({ status: 'success', body: { ...apiHelpers.makeTokenResponse(initialToken), advertising_token: refreshedToken } }));
60
59
  const configureUid2Response = (httpStatus, response) => server.respondWith('POST', apiUrl, (xhr) => xhr.respond(httpStatus, headers, response));
61
60
  const configureUid2ApiSuccessResponse = () => configureUid2Response(200, makeSuccessResponseBody());
62
61
  const configureUid2ApiFailResponse = () => configureUid2Response(500, 'Error');
63
62
 
64
- const respondAfterDelay = (delay) => new Promise((resolve) => setTimeout(() => {
65
- server.respond();
66
- setTimeout(() => resolve());
67
- }, delay));
68
-
69
- const runAuction = async () => {
70
- const adUnits = [{
71
- code: 'adUnit-code',
72
- mediaTypes: {banner: {}, native: {}},
73
- sizes: [[300, 200], [300, 600]],
74
- bids: [{bidder: 'sampleBidder', params: {placementId: 'banner-only-bidder'}}]
75
- }];
76
- return new Promise(function(resolve) {
77
- requestBidsHook(function() {
78
- resolve(adUnits[0].bids[0]);
79
- }, {adUnits});
80
- });
81
- }
82
-
83
63
  // Runs the provided test twice - once with a successful API mock, once with one which returns a server error
84
64
  const testApiSuccessAndFailure = (act, testDescription, failTestDescription, only = false) => {
85
65
  const testFn = only ? it.only : it;
@@ -92,6 +72,26 @@ const testApiSuccessAndFailure = (act, testDescription, failTestDescription, onl
92
72
  await act(false);
93
73
  });
94
74
  }
75
+
76
+ const testCookieAndLocalStorage = (description, test, only = false) => {
77
+ const describeFn = only ? describe.only : describe;
78
+ describeFn(`Using cookies: ${description}`, async function() {
79
+ before(function() {
80
+ useLocalStorage = false;
81
+ });
82
+ await test();
83
+ });
84
+ describeFn(`Using local storage: ${description}`, async function() {
85
+ before(function() {
86
+ useLocalStorage = true;
87
+ });
88
+ after(function() {
89
+ useLocalStorage = false;
90
+ });
91
+ await test();
92
+ });
93
+ };
94
+
95
95
  describe(`UID2 module`, function () {
96
96
  let suiteSandbox, testSandbox, timerSpy, fullTestTitle, restoreSubtleToUndefined = false;
97
97
  before(function () {
@@ -141,21 +141,21 @@ describe(`UID2 module`, function () {
141
141
  await timerSpy.waitAllActiveTimers();
142
142
  }
143
143
  }
144
- coreStorage.setCookie(moduleCookieName, '', expireCookieDate);
145
- coreStorage.setCookie(publisherCookieName, '', expireCookieDate);
144
+ cookieHelpers.clearCookies(moduleCookieName, publisherCookieName);
145
+ coreStorage.removeDataFromLocalStorage(moduleCookieName);
146
146
 
147
147
  debugOutput('----------------- END TEST ------------------');
148
148
  });
149
149
 
150
150
  describe('Configuration', function() {
151
151
  it('When no baseUrl is provided in config, the module calls the production endpoint', function() {
152
- const uid2Token = makeUid2Token(initialToken, true, true);
152
+ const uid2Token = apiHelpers.makeTokenResponse(initialToken, true, true);
153
153
  config.setConfig(makePrebidConfig({uid2Token}));
154
154
  expect(server.requests[0]?.url).to.have.string('https://prod.uidapi.com/');
155
155
  });
156
156
 
157
157
  it('When a baseUrl is provided in config, the module calls the provided endpoint', function() {
158
- const uid2Token = makeUid2Token(initialToken, true, true);
158
+ const uid2Token = apiHelpers.makeTokenResponse(initialToken, true, true);
159
159
  config.setConfig(makePrebidConfig({uid2Token, uid2ApiBase: 'https://operator-integ.uidapi.com'}));
160
160
  expect(server.requests[0]?.url).to.have.string('https://operator-integ.uidapi.com/');
161
161
  });
@@ -170,14 +170,25 @@ describe(`UID2 module`, function () {
170
170
  expectLegacyToken(bid);
171
171
  });
172
172
 
173
+ it('When a legacy value is provided directly in configuration but GDPR applies, it is not passed on', async function() {
174
+ const valueConfig = makePrebidConfig();
175
+ setGdprApplies();
176
+ valueConfig.userSync.userIds[0].value = {uid2: {id: legacyToken}}
177
+ config.setConfig(valueConfig);
178
+ const bid = await runAuction();
179
+
180
+ expectNoIdentity(bid);
181
+ });
182
+
173
183
  // These tests cover 'legacy' cookies - i.e. cookies set with just the uid2 advertising token, which was how some previous integrations worked.
174
184
  // Some users might still have this cookie, and the module should use that token if a newer one isn't provided.
175
185
  // This should cover older integrations where the server is setting this legacy cookie and expecting the module to pass it on.
176
186
  describe('When a legacy cookie exists', function () {
177
187
  // Creates a test which sets the legacy cookie, configures the UID2 module with provided params, runs an
178
- const createLegacyTest = function(params, bidAssertions) {
188
+ const createLegacyTest = function(params, bidAssertions, addConsent = false) {
179
189
  return async function() {
180
- coreStorage.setCookie(moduleCookieName, legacyToken, getFutureCookieExpiry());
190
+ coreStorage.setCookie(moduleCookieName, legacyToken, cookieHelpers.getFutureCookieExpiry());
191
+ if (addConsent) setGdprApplies();
181
192
  config.setConfig(makePrebidConfig(params));
182
193
 
183
194
  const bid = await runAuction();
@@ -189,120 +200,154 @@ describe(`UID2 module`, function () {
189
200
  createLegacyTest(legacyConfigParams, [expectLegacyToken]));
190
201
  it('and a server cookie config is used without a valid server cookie, it should provide the legacy cookie',
191
202
  createLegacyTest(serverCookieConfigParams, [expectLegacyToken]));
203
+ it('and a server cookie is used with a valid server cookie configured using the new param name, it should provide the server cookie',
204
+ async function() { cookieHelpers.setPublisherCookie(publisherCookieName, apiHelpers.makeTokenResponse(initialToken)); await createLegacyTest(serverCookieConfigParams, [(bid) => expectToken(bid, initialToken), expectNoLegacyToken])(); });
192
205
  it('and a server cookie is used with a valid server cookie, it should provide the server cookie',
193
- async function() { setPublisherCookie(makeUid2Token()); await createLegacyTest(serverCookieConfigParams, [expectInitialToken, expectNoLegacyToken])(); });
206
+ async function() { cookieHelpers.setPublisherCookie(publisherCookieName, apiHelpers.makeTokenResponse(initialToken)); await createLegacyTest(newServerCookieConfigParams, [(bid) => expectToken(bid, initialToken), expectNoLegacyToken])(); });
194
207
  it('and a token is provided in config, it should provide the config token',
195
- createLegacyTest({uid2Token: makeUid2Token()}, [expectInitialToken, expectNoLegacyToken]));
208
+ createLegacyTest({uid2Token: apiHelpers.makeTokenResponse(initialToken)}, [(bid) => expectToken(bid, initialToken), expectNoLegacyToken]));
209
+ it('and GDPR applies, no identity should be provided to the auction',
210
+ createLegacyTest(legacyConfigParams, [expectNoIdentity], true));
211
+ it('and GDPR applies, when getId is called directly it provides no identity', () => {
212
+ coreStorage.setCookie(moduleCookieName, legacyToken, cookieHelpers.getFutureCookieExpiry());
213
+ const consentConfig = setGdprApplies();
214
+ let configObj = makePrebidConfig(legacyConfigParams);
215
+ const result = uid2IdSubmodule.getId(configObj.userSync.userIds[0], consentConfig.consentData);
216
+ expect(result?.id).to.not.exist;
217
+ });
218
+
219
+ it('multiple runs do not change the value', async function() {
220
+ coreStorage.setCookie(moduleCookieName, legacyToken, cookieHelpers.getFutureCookieExpiry());
221
+ config.setConfig(makePrebidConfig(legacyConfigParams));
222
+
223
+ const bid = await runAuction();
224
+
225
+ console.log('Storage', coreStorage.getDataFromLocalStorage(moduleCookieName));
226
+ init(config);
227
+ setSubmoduleRegistry([uid2IdSubmodule]);
228
+ config.setConfig(makePrebidConfig(legacyConfigParams));
229
+ const bid2 = await runAuction();
230
+
231
+ expect(bid.userId.uid2.id).to.equal(bid2.userId.uid2.id);
232
+ });
196
233
  });
197
234
 
198
235
  // This setup runs all of the functional tests with both types of config - the full token response in params, or a server cookie with the cookie name provided
199
236
  let scenarios = [
200
237
  {
201
238
  name: 'Token provided in config call',
202
- setConfig: (token, extraConfig = {}) => config.setConfig(makePrebidConfig({uid2Token: token}, extraConfig)),
239
+ setConfig: (token, extraConfig = {}) => {
240
+ const gen = makePrebidConfig({uid2Token: token}, extraConfig);
241
+ console.log('GENERATED CONFIG', gen.userSync.userIds[0].params);
242
+ return config.setConfig(gen);
243
+ },
203
244
  },
204
245
  {
205
246
  name: 'Token provided in server-set cookie',
206
247
  setConfig: (token, extraConfig) => {
207
- setPublisherCookie(token);
248
+ cookieHelpers.setPublisherCookie(publisherCookieName, token);
208
249
  config.setConfig(makePrebidConfig(serverCookieConfigParams, extraConfig));
209
250
  },
210
251
  }
211
252
  ]
212
253
 
213
254
  scenarios.forEach(function(scenario) {
214
- describe(scenario.name, function() {
255
+ testCookieAndLocalStorage(scenario.name, function() {
215
256
  describe(`When an expired token which can be refreshed is provided`, function() {
216
257
  describe('When the refresh is available in time', function() {
217
258
  testApiSuccessAndFailure(async function(apiSucceeds) {
218
- scenario.setConfig(makeUid2Token(initialToken, true, true));
219
- respondAfterDelay(auctionDelayMs / 10);
259
+ scenario.setConfig(apiHelpers.makeTokenResponse(initialToken, true, true));
260
+ apiHelpers.respondAfterDelay(auctionDelayMs / 10);
220
261
  const bid = await runAuction();
221
262
 
222
- if (apiSucceeds) expectRefreshedToken(bid);
263
+ if (apiSucceeds) expectToken(bid, refreshedToken);
223
264
  else expectNoIdentity(bid);
224
265
  }, 'it should be used in the auction', 'the auction should have no uid2');
225
266
 
226
267
  testApiSuccessAndFailure(async function(apiSucceeds) {
227
- scenario.setConfig(makeUid2Token(initialToken, true, true));
228
- respondAfterDelay(auctionDelayMs / 10);
268
+ scenario.setConfig(apiHelpers.makeTokenResponse(initialToken, true, true));
269
+ apiHelpers.respondAfterDelay(auctionDelayMs / 10);
229
270
 
230
271
  await runAuction();
231
272
  if (apiSucceeds) {
232
- expectModuleCookieToContain(initialToken, refreshedToken);
273
+ expectModuleStorageToContain(initialToken, refreshedToken);
233
274
  } else {
234
- expectModuleCookieEmptyOrMissing();
275
+ expectModuleStorageEmptyOrMissing();
235
276
  }
236
- }, 'the refreshed token should be stored in the module cookie', 'the module cookie should not be set');
277
+ }, 'the refreshed token should be stored in the module storage', 'the module storage should not be set');
237
278
  });
238
279
  describe(`when the response doesn't arrive before the auction timer`, function() {
239
280
  testApiSuccessAndFailure(async function() {
240
- scenario.setConfig(makeUid2Token(initialToken, true, true));
281
+ scenario.setConfig(apiHelpers.makeTokenResponse(initialToken, true, true));
241
282
  const bid = await runAuction();
242
283
  expectNoIdentity(bid);
243
284
  }, 'it should run the auction');
244
285
 
245
286
  testApiSuccessAndFailure(async function(apiSucceeds) {
246
- scenario.setConfig(makeUid2Token(initialToken, true, true));
247
- const promise = respondAfterDelay(auctionDelayMs * 2);
287
+ scenario.setConfig(apiHelpers.makeTokenResponse(initialToken, true, true));
288
+ const promise = apiHelpers.respondAfterDelay(auctionDelayMs * 2);
248
289
 
249
290
  const bid = await runAuction();
250
291
  expectNoIdentity(bid);
251
292
  expectGlobalToHaveNoUid2();
252
293
  await promise;
253
- if (apiSucceeds) expectGlobalToHaveRefreshedIdentity();
294
+ if (apiSucceeds) expectGlobalToHaveToken(refreshedToken);
254
295
  else expectGlobalToHaveNoUid2();
255
296
  }, 'it should update the userId after the auction', 'there should be no global identity');
256
297
  })
257
298
  describe('and there is a refreshed token in the module cookie', function() {
258
299
  it('the refreshed value from the cookie is used', async function() {
259
- const initialIdentity = makeUid2Token(initialToken, true, true);
260
- const refreshedIdentity = makeUid2Token(refreshedToken);
300
+ const initialIdentity = apiHelpers.makeTokenResponse(initialToken, true, true);
301
+ const refreshedIdentity = apiHelpers.makeTokenResponse(refreshedToken);
261
302
  const moduleCookie = {originalToken: initialIdentity, latestToken: refreshedIdentity};
262
- coreStorage.setCookie(moduleCookieName, JSON.stringify(moduleCookie), getFutureCookieExpiry());
303
+ coreStorage.setCookie(moduleCookieName, JSON.stringify(moduleCookie), cookieHelpers.getFutureCookieExpiry());
263
304
  scenario.setConfig(initialIdentity);
264
305
 
265
306
  const bid = await runAuction();
266
- expectRefreshedToken(bid);
307
+ expectToken(bid, refreshedToken);
267
308
  });
268
309
  })
269
310
  });
270
311
 
271
312
  describe(`When a current token is provided`, function() {
272
- beforeEach(function() {
273
- scenario.setConfig(makeUid2Token());
274
- });
275
-
276
313
  it('it should use the token in the auction', async function() {
314
+ scenario.setConfig(apiHelpers.makeTokenResponse(initialToken));
277
315
  const bid = await runAuction();
278
- expectInitialToken(bid);
316
+ expectToken(bid, initialToken);
279
317
  });
318
+
319
+ it('and GDPR applies, the token should not be used', async function() {
320
+ setGdprApplies();
321
+ scenario.setConfig(apiHelpers.makeTokenResponse(initialToken));
322
+ const bid = await runAuction();
323
+ expectNoIdentity(bid);
324
+ })
280
325
  });
281
326
 
282
327
  describe(`When a current token which should be refreshed is provided, and the auction is set to run immediately`, function() {
283
328
  beforeEach(function() {
284
- scenario.setConfig(makeUid2Token(initialToken, true), {auctionDelay: 0, syncDelay: 1});
329
+ scenario.setConfig(apiHelpers.makeTokenResponse(initialToken, true), {auctionDelay: 0, syncDelay: 1});
285
330
  });
286
331
  testApiSuccessAndFailure(async function() {
287
- respondAfterDelay(10);
332
+ apiHelpers.respondAfterDelay(10);
288
333
  const bid = await runAuction();
289
- expectInitialToken(bid);
334
+ expectToken(bid, initialToken);
290
335
  }, 'it should not be refreshed before the auction runs');
291
336
 
292
337
  testApiSuccessAndFailure(async function(success) {
293
- const promise = respondAfterDelay(1);
338
+ const promise = apiHelpers.respondAfterDelay(1);
294
339
  await runAuction();
295
340
  await promise;
296
341
  if (success) {
297
- expectModuleCookieToContain(initialToken, refreshedToken);
342
+ expectModuleStorageToContain(initialToken, refreshedToken);
298
343
  } else {
299
- expectModuleCookieToContain(initialToken, initialToken);
344
+ expectModuleStorageToContain(initialToken, initialToken);
300
345
  }
301
346
  }, 'the refreshed token should be stored in the module cookie after the auction runs', 'the module cookie should only have the original token');
302
347
 
303
348
  it('it should use the current token in the auction', async function() {
304
349
  const bid = await runAuction();
305
- expectInitialToken(bid);
350
+ expectToken(bid, initialToken);
306
351
  });
307
352
  });
308
353
  });
@@ -43,6 +43,7 @@ import {mwOpenLinkIdSubModule} from 'modules/mwOpenLinkIdSystem.js';
43
43
  import {tapadIdSubmodule} from 'modules/tapadIdSystem.js';
44
44
  import {tncidSubModule} from 'modules/tncIdSystem.js';
45
45
  import {uid2IdSubmodule} from 'modules/uid2IdSystem.js';
46
+ import {euidIdSubmodule} from 'modules/euidIdSystem.js';
46
47
  import {admixerIdSubmodule} from 'modules/admixerIdSystem.js';
47
48
  import {deepintentDpesSubmodule} from 'modules/deepintentDpesIdSystem.js';
48
49
  import {amxIdSubmodule} from '../../../modules/amxIdSystem.js';
@@ -868,7 +869,7 @@ describe('User ID', function () {
868
869
 
869
870
  it('handles config with no usersync object', function () {
870
871
  init(config);
871
- 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]);
872
873
  config.setConfig({});
873
874
  // usersync is undefined, and no logInfo message for 'User ID - usersync config updated'
874
875
  expect(typeof utils.logInfo.args[0]).to.equal('undefined');
@@ -876,14 +877,14 @@ describe('User ID', function () {
876
877
 
877
878
  it('handles config with empty usersync object', function () {
878
879
  init(config);
879
- 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]);
880
881
  config.setConfig({userSync: {}});
881
882
  expect(typeof utils.logInfo.args[0]).to.equal('undefined');
882
883
  });
883
884
 
884
885
  it('handles config with usersync and userIds that are empty objs', function () {
885
886
  init(config);
886
- 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]);
887
888
  config.setConfig({
888
889
  userSync: {
889
890
  userIds: [{}]
@@ -894,7 +895,7 @@ describe('User ID', function () {
894
895
 
895
896
  it('handles config with usersync and userIds with empty names or that dont match a submodule.name', function () {
896
897
  init(config);
897
- 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]);
898
899
  config.setConfig({
899
900
  userSync: {
900
901
  userIds: [{
@@ -911,7 +912,7 @@ describe('User ID', function () {
911
912
 
912
913
  it('config with 1 configurations should create 1 submodules', function () {
913
914
  init(config);
914
- 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]);
915
916
  config.setConfig(getConfigMock(['unifiedId', 'unifiedid', 'cookie']));
916
917
 
917
918
  expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 1 submodules');
@@ -931,9 +932,9 @@ describe('User ID', function () {
931
932
  expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 1 submodules');
932
933
  });
933
934
 
934
- it('config with 22 configurations should result in 22 submodules add', function () {
935
+ it('config with 23 configurations should result in 23 submodules add', function () {
935
936
  init(config);
936
- 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]);
937
938
  config.setConfig({
938
939
  userSync: {
939
940
  syncDelay: 0,
@@ -976,6 +977,8 @@ describe('User ID', function () {
976
977
  storage: {name: 'tapad_id', type: 'cookie'}
977
978
  }, {
978
979
  name: 'uid2'
980
+ }, {
981
+ name: 'euid'
979
982
  }, {
980
983
  name: 'admixerId',
981
984
  storage: {name: 'admixerId', type: 'cookie'}
@@ -999,12 +1002,12 @@ describe('User ID', function () {
999
1002
  }]
1000
1003
  }
1001
1004
  });
1002
- expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 22 submodules');
1005
+ expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 23 submodules');
1003
1006
  });
1004
1007
 
1005
1008
  it('config syncDelay updates module correctly', function () {
1006
1009
  init(config);
1007
- 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]);
1008
1011
  config.setConfig({
1009
1012
  userSync: {
1010
1013
  syncDelay: 99,
@@ -1019,7 +1022,7 @@ describe('User ID', function () {
1019
1022
 
1020
1023
  it('config auctionDelay updates module correctly', function () {
1021
1024
  init(config);
1022
- 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]);
1023
1026
  config.setConfig({
1024
1027
  userSync: {
1025
1028
  auctionDelay: 100,
@@ -1034,7 +1037,7 @@ describe('User ID', function () {
1034
1037
 
1035
1038
  it('config auctionDelay defaults to 0 if not a number', function () {
1036
1039
  init(config);
1037
- 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]);
1038
1041
  config.setConfig({
1039
1042
  userSync: {
1040
1043
  auctionDelay: '',
@@ -2367,7 +2370,7 @@ describe('User ID', function () {
2367
2370
  localStorage.setItem('qid_exp', new Date(Date.now() + 5000).toUTCString())
2368
2371
 
2369
2372
  init(config);
2370
- 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]);
2371
2374
 
2372
2375
  config.setConfig({
2373
2376
  userSync: {
@@ -2501,6 +2504,7 @@ describe('User ID', function () {
2501
2504
  localStorage.removeItem('amxId');
2502
2505
  localStorage.removeItem('amxId_exp');
2503
2506
  coreStorage.setCookie('kpuid', EXPIRED_COOKIE_DATE);
2507
+ coreStorage.setCookie('__uid2_advertising_token', '', EXPIRED_COOKIE_DATE);
2504
2508
  done();
2505
2509
  }, {adUnits});
2506
2510
  });