prebid.js 8.3.0 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/admanBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.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/asoBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/brandmetricsRtdProvider.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/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dependencies.json +3 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/gdprEnforcement.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/id5IdSystem.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.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/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 +135 -135
- 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/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +2 -2
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pulsepointBidAdapter.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/riseBidAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharedIdSystem.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/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/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.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/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/uid2IdSystem.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/voxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yandexBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +1 -1
- package/integrationExamples/videoModule/jwplayer/eventListeners.html +2 -2
- package/integrationExamples/videoModule/jwplayer/eventsUI.html +1 -1
- package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +1 -1
- package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +1 -1
- package/integrationExamples/videoModule/jwplayer/playlist.html +1 -1
- package/integrationExamples/videoModule/videojs/bidMarkedAsUsed.html +1 -1
- package/integrationExamples/videoModule/videojs/bidRequestScheduling.html +1 -1
- package/integrationExamples/videoModule/videojs/eventListeners.html +1 -1
- package/integrationExamples/videoModule/videojs/eventsUI.html +1 -1
- package/integrationExamples/videoModule/videojs/gamAdServerMediation.html +1 -1
- package/integrationExamples/videoModule/videojs/mediaMetadata.html +1 -1
- package/integrationExamples/videoModule/videojs/playlist.html +1 -1
- package/modules/33acrossBidAdapter.js +24 -14
- package/modules/33acrossIdSystem.js +15 -4
- package/modules/adagioBidAdapter.js +0 -1
- package/modules/admanBidAdapter.js +4 -0
- package/modules/brandmetricsRtdProvider.js +36 -2
- package/modules/brandmetricsRtdProvider.md +17 -2
- package/modules/gdprEnforcement.js +27 -22
- package/modules/gridBidAdapter.js +19 -0
- package/modules/ixBidAdapter.js +40 -2
- package/modules/kargoBidAdapter.js +4 -0
- package/modules/minutemediaBidAdapter.js +17 -2
- package/modules/oguryBidAdapter.js +29 -16
- package/modules/pubmaticBidAdapter.js +16 -1
- package/modules/pulsepointBidAdapter.js +63 -424
- package/modules/pulsepointBidAdapter.md +39 -45
- package/modules/sharedIdSystem.js +1 -1
- package/modules/sovrnBidAdapter.js +5 -1
- package/modules/stroeerCoreBidAdapter.js +2 -3
- package/modules/teadsBidAdapter.js +2 -0
- package/modules/topicsFpdModule.js +4 -1
- package/modules/topicsFpdModule.md +4 -0
- package/modules/userId/index.js +2 -2
- package/modules/vidazooBidAdapter.js +5 -7
- package/modules/voxBidAdapter.js +16 -5
- package/modules/yahoosspBidAdapter.js +38 -33
- package/modules/yahoosspBidAdapter.md +96 -95
- package/modules/yandexBidAdapter.js +12 -15
- package/package.json +1 -1
- package/src/activities/redactor.js +1 -1
- package/src/auction.js +24 -2
- package/src/constants.json +3 -1
- package/src/fpd/sua.js +8 -2
- package/test/spec/auctionmanager_spec.js +29 -1
- package/test/spec/fpd/enrichment_spec.js +7 -1
- package/test/spec/fpd/sua_spec.js +12 -0
- package/test/spec/modules/33acrossBidAdapter_spec.js +188 -35
- package/test/spec/modules/33acrossIdSystem_spec.js +122 -27
- package/test/spec/modules/adagioBidAdapter_spec.js +0 -1
- package/test/spec/modules/brandmetricsRtdProvider_spec.js +69 -7
- package/test/spec/modules/gdprEnforcement_spec.js +43 -2
- package/test/spec/modules/gridBidAdapter_spec.js +42 -0
- package/test/spec/modules/ixBidAdapter_spec.js +72 -0
- package/test/spec/modules/kargoBidAdapter_spec.js +121 -106
- package/test/spec/modules/minutemediaBidAdapter_spec.js +36 -5
- package/test/spec/modules/oguryBidAdapter_spec.js +208 -108
- package/test/spec/modules/pubmaticBidAdapter_spec.js +119 -0
- package/test/spec/modules/pulsepointBidAdapter_spec.js +225 -486
- package/test/spec/modules/sovrnBidAdapter_spec.js +24 -4
- package/test/spec/modules/stroeerCoreBidAdapter_spec.js +8 -5
- package/test/spec/modules/teadsBidAdapter_spec.js +70 -21
- package/test/spec/modules/topicsFpdModule_spec.js +10 -4
- package/test/spec/modules/vidazooBidAdapter_spec.js +0 -5
- package/test/spec/modules/voxBidAdapter_spec.js +93 -0
- package/test/spec/modules/yahoosspBidAdapter_spec.js +402 -314
- package/test/spec/modules/yandexBidAdapter_spec.js +21 -3
- package/integrationExamples/gpt/inskin_example.html +0 -100
|
@@ -113,132 +113,232 @@ describe('OguryBidAdapter', function () {
|
|
|
113
113
|
let syncOptions, gdprConsent;
|
|
114
114
|
|
|
115
115
|
beforeEach(() => {
|
|
116
|
-
syncOptions = {pixelEnabled: true};
|
|
117
116
|
gdprConsent = {
|
|
118
117
|
gdprApplies: true,
|
|
119
118
|
consentString: 'CPJl4C8PJl4C8OoAAAENAwCMAP_AAH_AAAAAAPgAAAAIAPgAAAAIAAA.IGLtV_T9fb2vj-_Z99_tkeYwf95y3p-wzhheMs-8NyZeH_B4Wv2MyvBX4JiQKGRgksjLBAQdtHGlcTQgBwIlViTLMYk2MjzNKJrJEilsbO2dYGD9Pn8HT3ZCY70-vv__7v3ff_3g'
|
|
120
119
|
};
|
|
121
120
|
});
|
|
122
121
|
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
describe('pixel', () => {
|
|
123
|
+
beforeEach(() => {
|
|
124
|
+
syncOptions = { pixelEnabled: true };
|
|
125
|
+
});
|
|
125
126
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
expect(userSyncs[0].url).to.contain('https://ms-cookie-sync.presage.io/v1/init-sync/bid-switch');
|
|
129
|
-
expect(userSyncs[1].type).to.equal('image');
|
|
130
|
-
expect(userSyncs[1].url).to.contain('https://ms-cookie-sync.presage.io/ttd/init-sync');
|
|
131
|
-
expect(userSyncs[2].type).to.equal('image');
|
|
132
|
-
expect(userSyncs[2].url).to.contain('https://ms-cookie-sync.presage.io/xandr/init-sync');
|
|
133
|
-
});
|
|
127
|
+
it('should return syncs array with three elements of type image', () => {
|
|
128
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
134
129
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
130
|
+
expect(userSyncs).to.have.lengthOf(3);
|
|
131
|
+
expect(userSyncs[0].type).to.equal('image');
|
|
132
|
+
expect(userSyncs[0].url).to.contain('https://ms-cookie-sync.presage.io/v1/init-sync/bid-switch');
|
|
133
|
+
expect(userSyncs[1].type).to.equal('image');
|
|
134
|
+
expect(userSyncs[1].url).to.contain('https://ms-cookie-sync.presage.io/ttd/init-sync');
|
|
135
|
+
expect(userSyncs[2].type).to.equal('image');
|
|
136
|
+
expect(userSyncs[2].url).to.contain('https://ms-cookie-sync.presage.io/xandr/init-sync');
|
|
137
|
+
});
|
|
141
138
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
139
|
+
it('should set the source as query param', () => {
|
|
140
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
141
|
+
expect(userSyncs[0].url).to.contain('source=prebid');
|
|
142
|
+
expect(userSyncs[1].url).to.contain('source=prebid');
|
|
143
|
+
expect(userSyncs[2].url).to.contain('source=prebid');
|
|
144
|
+
});
|
|
148
145
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
146
|
+
it('should set the tcString as query param', () => {
|
|
147
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
148
|
+
expect(userSyncs[0].url).to.contain(`iab_string=${gdprConsent.consentString}`);
|
|
149
|
+
expect(userSyncs[1].url).to.contain(`iab_string=${gdprConsent.consentString}`);
|
|
150
|
+
expect(userSyncs[2].url).to.contain(`iab_string=${gdprConsent.consentString}`);
|
|
151
|
+
});
|
|
153
152
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
};
|
|
153
|
+
it('should return an empty array when pixel is disable', () => {
|
|
154
|
+
syncOptions.pixelEnabled = false;
|
|
155
|
+
expect(spec.getUserSyncs(syncOptions, [], gdprConsent)).to.have.lengthOf(0);
|
|
156
|
+
});
|
|
159
157
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
166
|
-
expect(userSyncs[2].type).to.equal('image');
|
|
167
|
-
expect(userSyncs[2].url).to.equal('https://ms-cookie-sync.presage.io/xandr/init-sync?iab_string=&source=prebid')
|
|
168
|
-
});
|
|
158
|
+
it('should return syncs array with three elements of type image when consentString is undefined', () => {
|
|
159
|
+
gdprConsent = {
|
|
160
|
+
gdprApplies: true,
|
|
161
|
+
consentString: undefined
|
|
162
|
+
};
|
|
169
163
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
164
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
165
|
+
expect(userSyncs).to.have.lengthOf(3);
|
|
166
|
+
expect(userSyncs[0].type).to.equal('image');
|
|
167
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/v1/init-sync/bid-switch?iab_string=&source=prebid')
|
|
168
|
+
expect(userSyncs[1].type).to.equal('image');
|
|
169
|
+
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
170
|
+
expect(userSyncs[2].type).to.equal('image');
|
|
171
|
+
expect(userSyncs[2].url).to.equal('https://ms-cookie-sync.presage.io/xandr/init-sync?iab_string=&source=prebid')
|
|
172
|
+
});
|
|
175
173
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
182
|
-
expect(userSyncs[2].type).to.equal('image');
|
|
183
|
-
expect(userSyncs[2].url).to.equal('https://ms-cookie-sync.presage.io/xandr/init-sync?iab_string=&source=prebid')
|
|
184
|
-
});
|
|
174
|
+
it('should return syncs array with three elements of type image when consentString is null', () => {
|
|
175
|
+
gdprConsent = {
|
|
176
|
+
gdprApplies: true,
|
|
177
|
+
consentString: null
|
|
178
|
+
};
|
|
185
179
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
expect(userSyncs[2].type).to.equal('image');
|
|
196
|
-
expect(userSyncs[2].url).to.equal('https://ms-cookie-sync.presage.io/xandr/init-sync?iab_string=&source=prebid')
|
|
197
|
-
});
|
|
180
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
181
|
+
expect(userSyncs).to.have.lengthOf(3);
|
|
182
|
+
expect(userSyncs[0].type).to.equal('image');
|
|
183
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/v1/init-sync/bid-switch?iab_string=&source=prebid')
|
|
184
|
+
expect(userSyncs[1].type).to.equal('image');
|
|
185
|
+
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
186
|
+
expect(userSyncs[2].type).to.equal('image');
|
|
187
|
+
expect(userSyncs[2].url).to.equal('https://ms-cookie-sync.presage.io/xandr/init-sync?iab_string=&source=prebid')
|
|
188
|
+
});
|
|
198
189
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
190
|
+
it('should return syncs array with three elements of type image when gdprConsent is undefined', () => {
|
|
191
|
+
gdprConsent = undefined;
|
|
192
|
+
|
|
193
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
194
|
+
expect(userSyncs).to.have.lengthOf(3);
|
|
195
|
+
expect(userSyncs[0].type).to.equal('image');
|
|
196
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/v1/init-sync/bid-switch?iab_string=&source=prebid')
|
|
197
|
+
expect(userSyncs[1].type).to.equal('image');
|
|
198
|
+
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
199
|
+
expect(userSyncs[2].type).to.equal('image');
|
|
200
|
+
expect(userSyncs[2].url).to.equal('https://ms-cookie-sync.presage.io/xandr/init-sync?iab_string=&source=prebid')
|
|
201
|
+
});
|
|
211
202
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
203
|
+
it('should return syncs array with three elements of type image when gdprConsent is null', () => {
|
|
204
|
+
gdprConsent = null;
|
|
205
|
+
|
|
206
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
207
|
+
expect(userSyncs).to.have.lengthOf(3);
|
|
208
|
+
expect(userSyncs[0].type).to.equal('image');
|
|
209
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/v1/init-sync/bid-switch?iab_string=&source=prebid')
|
|
210
|
+
expect(userSyncs[1].type).to.equal('image');
|
|
211
|
+
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
212
|
+
expect(userSyncs[2].type).to.equal('image');
|
|
213
|
+
expect(userSyncs[2].url).to.equal('https://ms-cookie-sync.presage.io/xandr/init-sync?iab_string=&source=prebid')
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
it('should return syncs array with three elements of type image when gdprConsent is null and gdprApplies is false', () => {
|
|
217
|
+
gdprConsent = {
|
|
218
|
+
gdprApplies: false,
|
|
219
|
+
consentString: null
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
223
|
+
expect(userSyncs).to.have.lengthOf(3);
|
|
224
|
+
expect(userSyncs[0].type).to.equal('image');
|
|
225
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/v1/init-sync/bid-switch?iab_string=&source=prebid')
|
|
226
|
+
expect(userSyncs[1].type).to.equal('image');
|
|
227
|
+
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
228
|
+
expect(userSyncs[2].type).to.equal('image');
|
|
229
|
+
expect(userSyncs[2].url).to.equal('https://ms-cookie-sync.presage.io/xandr/init-sync?iab_string=&source=prebid')
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
it('should return syncs array with three elements of type image when gdprConsent is empty string and gdprApplies is false', () => {
|
|
233
|
+
gdprConsent = {
|
|
234
|
+
gdprApplies: false,
|
|
235
|
+
consentString: ''
|
|
236
|
+
};
|
|
217
237
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
238
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
239
|
+
expect(userSyncs).to.have.lengthOf(3);
|
|
240
|
+
expect(userSyncs[0].type).to.equal('image');
|
|
241
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/v1/init-sync/bid-switch?iab_string=&source=prebid')
|
|
242
|
+
expect(userSyncs[1].type).to.equal('image');
|
|
243
|
+
expect(userSyncs[1].url).to.equal('https://ms-cookie-sync.presage.io/ttd/init-sync?iab_string=&source=prebid')
|
|
244
|
+
expect(userSyncs[2].type).to.equal('image');
|
|
245
|
+
expect(userSyncs[2].url).to.equal('https://ms-cookie-sync.presage.io/xandr/init-sync?iab_string=&source=prebid')
|
|
246
|
+
});
|
|
226
247
|
});
|
|
227
248
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
};
|
|
249
|
+
describe('iframe', () => {
|
|
250
|
+
beforeEach(() => {
|
|
251
|
+
syncOptions = { iframeEnabled: true };
|
|
252
|
+
});
|
|
233
253
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
254
|
+
it('should return syncs array with one element of type iframe', () => {
|
|
255
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
256
|
+
|
|
257
|
+
expect(userSyncs).to.have.lengthOf(1);
|
|
258
|
+
expect(userSyncs[0].type).to.equal('iframe');
|
|
259
|
+
expect(userSyncs[0].url).to.contain('https://ms-cookie-sync.presage.io/user-sync.html');
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
it('should set the source as query param', () => {
|
|
263
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
264
|
+
expect(userSyncs[0].url).to.contain('source=prebid');
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
it('should set the tcString as query param', () => {
|
|
268
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
269
|
+
expect(userSyncs[0].url).to.contain(`gdpr_consent=${gdprConsent.consentString}`);
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
it('should return an empty array when iframe is disable', () => {
|
|
273
|
+
syncOptions.iframeEnabled = false;
|
|
274
|
+
expect(spec.getUserSyncs(syncOptions, [], gdprConsent)).to.have.lengthOf(0);
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
it('should return syncs array with one element of type iframe when consentString is undefined', () => {
|
|
278
|
+
gdprConsent = {
|
|
279
|
+
gdprApplies: true,
|
|
280
|
+
consentString: undefined
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
284
|
+
expect(userSyncs).to.have.lengthOf(1);
|
|
285
|
+
expect(userSyncs[0].type).to.equal('iframe');
|
|
286
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/user-sync.html?gdpr_consent=&source=prebid')
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
it('should return syncs array with one element of type iframe when consentString is null', () => {
|
|
290
|
+
gdprConsent = {
|
|
291
|
+
gdprApplies: true,
|
|
292
|
+
consentString: null
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
296
|
+
expect(userSyncs).to.have.lengthOf(1);
|
|
297
|
+
expect(userSyncs[0].type).to.equal('iframe');
|
|
298
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/user-sync.html?gdpr_consent=&source=prebid')
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
it('should return syncs array with one element of type iframe when gdprConsent is undefined', () => {
|
|
302
|
+
gdprConsent = undefined;
|
|
303
|
+
|
|
304
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
305
|
+
expect(userSyncs).to.have.lengthOf(1);
|
|
306
|
+
expect(userSyncs[0].type).to.equal('iframe');
|
|
307
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/user-sync.html?gdpr_consent=&source=prebid')
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
it('should return syncs array with one element of type iframe when gdprConsent is null', () => {
|
|
311
|
+
gdprConsent = null;
|
|
312
|
+
|
|
313
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
314
|
+
expect(userSyncs).to.have.lengthOf(1);
|
|
315
|
+
expect(userSyncs[0].type).to.equal('iframe');
|
|
316
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/user-sync.html?gdpr_consent=&source=prebid')
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
it('should return syncs array with one element of type iframe when gdprConsent is null and gdprApplies is false', () => {
|
|
320
|
+
gdprConsent = {
|
|
321
|
+
gdprApplies: false,
|
|
322
|
+
consentString: null
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
326
|
+
expect(userSyncs).to.have.lengthOf(1);
|
|
327
|
+
expect(userSyncs[0].type).to.equal('iframe');
|
|
328
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/user-sync.html?gdpr_consent=&source=prebid')
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
it('should return syncs array with one element of type iframe when gdprConsent is empty string and gdprApplies is false', () => {
|
|
332
|
+
gdprConsent = {
|
|
333
|
+
gdprApplies: false,
|
|
334
|
+
consentString: ''
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
const userSyncs = spec.getUserSyncs(syncOptions, [], gdprConsent);
|
|
338
|
+
expect(userSyncs).to.have.lengthOf(1);
|
|
339
|
+
expect(userSyncs[0].type).to.equal('iframe');
|
|
340
|
+
expect(userSyncs[0].url).to.equal('https://ms-cookie-sync.presage.io/user-sync.html?gdpr_consent=&source=prebid')
|
|
341
|
+
});
|
|
242
342
|
});
|
|
243
343
|
});
|
|
244
344
|
|
|
@@ -311,7 +411,7 @@ describe('OguryBidAdapter', function () {
|
|
|
311
411
|
},
|
|
312
412
|
ext: {
|
|
313
413
|
prebidversion: '$prebid.version$',
|
|
314
|
-
adapterversion: '1.
|
|
414
|
+
adapterversion: '1.5.0'
|
|
315
415
|
},
|
|
316
416
|
device: {
|
|
317
417
|
w: stubbedWidth,
|
|
@@ -713,7 +813,7 @@ describe('OguryBidAdapter', function () {
|
|
|
713
813
|
advertiserDomains: openRtbBidResponse.body.seatbid[0].bid[0].adomain
|
|
714
814
|
},
|
|
715
815
|
nurl: openRtbBidResponse.body.seatbid[0].bid[0].nurl,
|
|
716
|
-
adapterVersion: '1.
|
|
816
|
+
adapterVersion: '1.5.0',
|
|
717
817
|
prebidVersion: '$prebid.version$'
|
|
718
818
|
}, {
|
|
719
819
|
requestId: openRtbBidResponse.body.seatbid[0].bid[1].impid,
|
|
@@ -730,7 +830,7 @@ describe('OguryBidAdapter', function () {
|
|
|
730
830
|
advertiserDomains: openRtbBidResponse.body.seatbid[0].bid[1].adomain
|
|
731
831
|
},
|
|
732
832
|
nurl: openRtbBidResponse.body.seatbid[0].bid[1].nurl,
|
|
733
|
-
adapterVersion: '1.
|
|
833
|
+
adapterVersion: '1.5.0',
|
|
734
834
|
prebidVersion: '$prebid.version$'
|
|
735
835
|
}]
|
|
736
836
|
|
|
@@ -3057,6 +3057,76 @@ describe('PubMatic adapter', function () {
|
|
|
3057
3057
|
});
|
|
3058
3058
|
}
|
|
3059
3059
|
|
|
3060
|
+
describe('GPP', function() {
|
|
3061
|
+
it('Request params check with GPP Consent', function () {
|
|
3062
|
+
let bidRequest = {
|
|
3063
|
+
gppConsent: {
|
|
3064
|
+
'gppString': 'DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN',
|
|
3065
|
+
'fullGppData': {
|
|
3066
|
+
'sectionId': 3,
|
|
3067
|
+
'gppVersion': 1,
|
|
3068
|
+
'sectionList': [
|
|
3069
|
+
5,
|
|
3070
|
+
7
|
|
3071
|
+
],
|
|
3072
|
+
'applicableSections': [
|
|
3073
|
+
5
|
|
3074
|
+
],
|
|
3075
|
+
'gppString': 'DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN',
|
|
3076
|
+
'pingData': {
|
|
3077
|
+
'cmpStatus': 'loaded',
|
|
3078
|
+
'gppVersion': '1.0',
|
|
3079
|
+
'cmpDisplayStatus': 'visible',
|
|
3080
|
+
'supportedAPIs': [
|
|
3081
|
+
'tcfca',
|
|
3082
|
+
'usnat',
|
|
3083
|
+
'usca',
|
|
3084
|
+
'usva',
|
|
3085
|
+
'usco',
|
|
3086
|
+
'usut',
|
|
3087
|
+
'usct'
|
|
3088
|
+
],
|
|
3089
|
+
'cmpId': 31
|
|
3090
|
+
},
|
|
3091
|
+
'eventName': 'sectionChange'
|
|
3092
|
+
},
|
|
3093
|
+
'applicableSections': [
|
|
3094
|
+
5
|
|
3095
|
+
],
|
|
3096
|
+
'apiVersion': 1
|
|
3097
|
+
}
|
|
3098
|
+
};
|
|
3099
|
+
let request = spec.buildRequests(bidRequests, bidRequest);
|
|
3100
|
+
let data = JSON.parse(request.data);
|
|
3101
|
+
expect(data.regs.gpp).to.equal('DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN');
|
|
3102
|
+
expect(data.regs.gpp_sid[0]).to.equal(5);
|
|
3103
|
+
});
|
|
3104
|
+
|
|
3105
|
+
it('Request params check without GPP Consent', function () {
|
|
3106
|
+
let bidRequest = {};
|
|
3107
|
+
let request = spec.buildRequests(bidRequests, bidRequest);
|
|
3108
|
+
let data = JSON.parse(request.data);
|
|
3109
|
+
expect(data.regs).to.equal(undefined);
|
|
3110
|
+
});
|
|
3111
|
+
|
|
3112
|
+
it('Request params check with GPP Consent read from ortb2', function () {
|
|
3113
|
+
let bidRequest = {
|
|
3114
|
+
ortb2: {
|
|
3115
|
+
regs: {
|
|
3116
|
+
'gpp': 'DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN',
|
|
3117
|
+
'gpp_sid': [
|
|
3118
|
+
5
|
|
3119
|
+
]
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
};
|
|
3123
|
+
let request = spec.buildRequests(bidRequests, bidRequest);
|
|
3124
|
+
let data = JSON.parse(request.data);
|
|
3125
|
+
expect(data.regs.gpp).to.equal('DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN');
|
|
3126
|
+
expect(data.regs.gpp_sid[0]).to.equal(5);
|
|
3127
|
+
});
|
|
3128
|
+
});
|
|
3129
|
+
|
|
3060
3130
|
describe('Fledge', function() {
|
|
3061
3131
|
it('should not send imp.ext.ae when FLEDGE is disabled, ', function () {
|
|
3062
3132
|
let bidRequest = Object.assign([], bidRequests);
|
|
@@ -3991,6 +4061,55 @@ describe('PubMatic adapter', function () {
|
|
|
3991
4061
|
type: 'image', url: `${syncurl_image}&gdpr=1&gdpr_consent=foo&us_privacy=1NYN&coppa=1`
|
|
3992
4062
|
}]);
|
|
3993
4063
|
});
|
|
4064
|
+
|
|
4065
|
+
describe('GPP', function() {
|
|
4066
|
+
it('should return userSync url without Gpp consent if gppConsent is undefined', () => {
|
|
4067
|
+
const result = spec.getUserSyncs({iframeEnabled: true}, undefined, undefined, undefined, undefined);
|
|
4068
|
+
expect(result).to.deep.equal([{
|
|
4069
|
+
type: 'iframe', url: `${syncurl_iframe}`
|
|
4070
|
+
}]);
|
|
4071
|
+
});
|
|
4072
|
+
|
|
4073
|
+
it('should return userSync url without Gpp consent if gppConsent.gppString is undefined', () => {
|
|
4074
|
+
const gppConsent = { applicableSections: ['5'] };
|
|
4075
|
+
const result = spec.getUserSyncs({iframeEnabled: true}, undefined, undefined, undefined, gppConsent);
|
|
4076
|
+
expect(result).to.deep.equal([{
|
|
4077
|
+
type: 'iframe', url: `${syncurl_iframe}`
|
|
4078
|
+
}]);
|
|
4079
|
+
});
|
|
4080
|
+
|
|
4081
|
+
it('should return userSync url without Gpp consent if gppConsent.applicableSections is undefined', () => {
|
|
4082
|
+
const gppConsent = { gppString: 'DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN' };
|
|
4083
|
+
const result = spec.getUserSyncs({iframeEnabled: true}, undefined, undefined, undefined, gppConsent);
|
|
4084
|
+
expect(result).to.deep.equal([{
|
|
4085
|
+
type: 'iframe', url: `${syncurl_iframe}`
|
|
4086
|
+
}]);
|
|
4087
|
+
});
|
|
4088
|
+
|
|
4089
|
+
it('should return userSync url without Gpp consent if gppConsent.applicableSections is an empty array', () => {
|
|
4090
|
+
const gppConsent = { gppString: 'DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN', applicableSections: [] };
|
|
4091
|
+
const result = spec.getUserSyncs({iframeEnabled: true}, undefined, undefined, undefined, gppConsent);
|
|
4092
|
+
expect(result).to.deep.equal([{
|
|
4093
|
+
type: 'iframe', url: `${syncurl_iframe}`
|
|
4094
|
+
}]);
|
|
4095
|
+
});
|
|
4096
|
+
|
|
4097
|
+
it('should concatenate gppString and applicableSections values in the returned userSync iframe url', () => {
|
|
4098
|
+
const gppConsent = { gppString: 'DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN', applicableSections: [5] };
|
|
4099
|
+
const result = spec.getUserSyncs({iframeEnabled: true}, undefined, undefined, undefined, gppConsent);
|
|
4100
|
+
expect(result).to.deep.equal([{
|
|
4101
|
+
type: 'iframe', url: `${syncurl_iframe}&gpp=${encodeURIComponent(gppConsent.gppString)}&gpp_sid=${encodeURIComponent(gppConsent.applicableSections)}`
|
|
4102
|
+
}]);
|
|
4103
|
+
});
|
|
4104
|
+
|
|
4105
|
+
it('should concatenate gppString and applicableSections values in the returned userSync image url', () => {
|
|
4106
|
+
const gppConsent = { gppString: 'DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN', applicableSections: [5] };
|
|
4107
|
+
const result = spec.getUserSyncs({iframeEnabled: false}, undefined, undefined, undefined, gppConsent);
|
|
4108
|
+
expect(result).to.deep.equal([{
|
|
4109
|
+
type: 'image', url: `${syncurl_image}&gpp=${encodeURIComponent(gppConsent.gppString)}&gpp_sid=${encodeURIComponent(gppConsent.applicableSections)}`
|
|
4110
|
+
}]);
|
|
4111
|
+
});
|
|
4112
|
+
});
|
|
3994
4113
|
});
|
|
3995
4114
|
|
|
3996
4115
|
if (FEATURES.VIDEO) {
|