prebid.js 7.33.0 → 7.34.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/.github/workflows/issue_tracker.yml +26 -15
- 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/admaticBidAdapter.js +1 -1
- package/dist/admixerBidAdapter.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.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/arcspanRtdProvider.js +1 -0
- 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/bliinkBidAdapter.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/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/emx_digitalBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/holidBidAdapter.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/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/lotamePanoramaIdSystem.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +126 -125
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/ortbConverter.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 +1 -1
- package/dist/prebidServerBidAdapter.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/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/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/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/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/libraries/ortbConverter/processors/default.js +19 -1
- package/modules/.submodules.json +1 -0
- package/modules/admaticBidAdapter.js +2 -1
- package/modules/admixerBidAdapter.js +26 -4
- package/modules/adnuntiusBidAdapter.js +36 -38
- package/modules/arcspanRtdProvider.js +73 -0
- package/modules/arcspanRtdProvider.md +11 -0
- package/modules/bliinkBidAdapter.js +1 -1
- package/modules/consumableBidAdapter.js +20 -2
- package/modules/criteoBidAdapter.js +1 -1
- package/modules/emx_digitalBidAdapter.js +9 -2
- package/modules/holidBidAdapter.js +9 -4
- package/modules/kargoBidAdapter.js +5 -1
- package/modules/lotamePanoramaIdSystem.js +9 -1
- package/modules/nextMillenniumBidAdapter.js +19 -9
- package/modules/openxBidAdapter.js +5 -0
- package/modules/prebidServerBidAdapter/index.js +14 -1
- package/modules/prebidServerBidAdapter/ortbConverter.js +1 -1
- package/modules/seedingAllianceBidAdapter.js +129 -116
- package/modules/tripleliftBidAdapter.js +4 -0
- package/package.json +1 -1
- package/src/adloader.js +2 -1
- package/test/spec/modules/admixerBidAdapter_spec.js +140 -60
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +120 -120
- package/test/spec/modules/arcspanRtdProvider_spec.js +187 -0
- package/test/spec/modules/bliinkBidAdapter_spec.js +7 -7
- package/test/spec/modules/consumableBidAdapter_spec.js +46 -0
- package/test/spec/modules/emx_digitalBidAdapter_spec.js +30 -1
- package/test/spec/modules/holidBidAdapter_spec.js +29 -0
- package/test/spec/modules/kargoBidAdapter_spec.js +32 -0
- package/test/spec/modules/lotamePanoramaIdSystem_spec.js +16 -10
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +14 -2
- package/test/spec/modules/openxBidAdapter_spec.js +41 -0
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +41 -0
- package/test/spec/modules/prebidServerBidAdapter_spec.js +138 -0
- package/test/spec/modules/seedingAllianceAdapter_spec.js +66 -23
- package/test/spec/modules/tripleliftBidAdapter_spec.js +13 -0
- package/test/spec/ortbConverter/default_processors_spec.js +23 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { arcspanSubmodule } from 'modules/arcspanRtdProvider.js';
|
|
2
|
+
import { expect } from 'chai';
|
|
3
|
+
import { loadExternalScript } from 'src/adloader.js';
|
|
4
|
+
|
|
5
|
+
describe('arcspanRtdProvider', function () {
|
|
6
|
+
describe('init', function () {
|
|
7
|
+
afterEach(function () {
|
|
8
|
+
window.arcobj1 = undefined;
|
|
9
|
+
window.arcobj2 = undefined;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('successfully initializes with a valid silo ID', function () {
|
|
13
|
+
expect(arcspanSubmodule.init(getGoodConfig())).to.equal(true);
|
|
14
|
+
expect(loadExternalScript.called).to.be.ok;
|
|
15
|
+
expect(loadExternalScript.args[0][0]).to.deep.equal('https://silo13.p7cloud.net/as.js');
|
|
16
|
+
loadExternalScript.resetHistory();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('fails to initialize with a missing silo ID', function () {
|
|
20
|
+
expect(arcspanSubmodule.init(getBadConfig())).to.equal(false);
|
|
21
|
+
expect(loadExternalScript.called).to.be.not.ok;
|
|
22
|
+
loadExternalScript.resetHistory();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('drops localhost script for test silo', function () {
|
|
26
|
+
expect(arcspanSubmodule.init(getTestConfig())).to.equal(true);
|
|
27
|
+
expect(loadExternalScript.called).to.be.ok;
|
|
28
|
+
expect(loadExternalScript.args[0][0]).to.deep.equal('https://localhost:8080/as.js');
|
|
29
|
+
loadExternalScript.resetHistory();
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
describe('alterBidRequests', function () {
|
|
34
|
+
afterEach(function () {
|
|
35
|
+
window.arcobj1 = undefined;
|
|
36
|
+
window.arcobj2 = undefined;
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('alters the bid request 1', function () {
|
|
40
|
+
setIAB({
|
|
41
|
+
raw: {
|
|
42
|
+
images: [
|
|
43
|
+
'Religion & Spirituality',
|
|
44
|
+
'Medical Health>Substance Abuse',
|
|
45
|
+
'Religion & Spirituality>Astrology',
|
|
46
|
+
'Medical Health',
|
|
47
|
+
'Events & Attractions',
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
codes: {
|
|
51
|
+
images: ['IAB23-10', 'IAB7', 'IAB7-42', 'IAB15-1'],
|
|
52
|
+
},
|
|
53
|
+
newcodes: {
|
|
54
|
+
images: ['150', '453', '311', '456', '286'],
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
var reqBidsConfigObj = {};
|
|
59
|
+
reqBidsConfigObj.ortb2Fragments = {};
|
|
60
|
+
reqBidsConfigObj.ortb2Fragments.global = {};
|
|
61
|
+
arcspanSubmodule.getBidRequestData(reqBidsConfigObj, function () {
|
|
62
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.name).to.equal(
|
|
63
|
+
'arcspan'
|
|
64
|
+
);
|
|
65
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.keywords).to.equal(
|
|
66
|
+
'Religion & Spirituality,Medical Health>Substance Abuse,Religion & Spirituality>Astrology,Medical Health,Events & Attractions'
|
|
67
|
+
);
|
|
68
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.content.data[0].ext.segtax).to.equal(6);
|
|
69
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.cat).to.eql([
|
|
70
|
+
'IAB23_10',
|
|
71
|
+
'IAB7',
|
|
72
|
+
'IAB7_42',
|
|
73
|
+
'IAB15_1',
|
|
74
|
+
]);
|
|
75
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.sectioncat).to.eql([
|
|
76
|
+
'IAB23_10',
|
|
77
|
+
'IAB7',
|
|
78
|
+
'IAB7_42',
|
|
79
|
+
'IAB15_1'
|
|
80
|
+
]);
|
|
81
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.pagecat).to.eql([
|
|
82
|
+
'IAB23_10',
|
|
83
|
+
'IAB7',
|
|
84
|
+
'IAB7_42',
|
|
85
|
+
'IAB15_1',
|
|
86
|
+
]);
|
|
87
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.content.data[0].segment).to.eql([
|
|
88
|
+
{ id: '150' },
|
|
89
|
+
{ id: '453' },
|
|
90
|
+
{ id: '311' },
|
|
91
|
+
{ id: '456' },
|
|
92
|
+
{ id: '286' }
|
|
93
|
+
]);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('alters the bid request 2', function () {
|
|
98
|
+
setIAB({
|
|
99
|
+
raw: { text: ['Sports', 'Sports>Soccer'] },
|
|
100
|
+
codes: { text: ['IAB17', 'IAB17-44'] },
|
|
101
|
+
newcodes: { text: ['483', '533'] },
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
var reqBidsConfigObj = {};
|
|
105
|
+
reqBidsConfigObj.ortb2Fragments = {};
|
|
106
|
+
reqBidsConfigObj.ortb2Fragments.global = {};
|
|
107
|
+
arcspanSubmodule.getBidRequestData(reqBidsConfigObj, function () {
|
|
108
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.name).to.equal(
|
|
109
|
+
'arcspan'
|
|
110
|
+
);
|
|
111
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.keywords).to.equal(
|
|
112
|
+
'Sports,Sports>Soccer'
|
|
113
|
+
);
|
|
114
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.content.data[0].ext.segtax).to.equal(6);
|
|
115
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.cat).to.eql([
|
|
116
|
+
'IAB17',
|
|
117
|
+
'IAB17_44',
|
|
118
|
+
]);
|
|
119
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.sectioncat).to.eql([
|
|
120
|
+
'IAB17',
|
|
121
|
+
'IAB17_44'
|
|
122
|
+
]);
|
|
123
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.pagecat).to.eql([
|
|
124
|
+
'IAB17',
|
|
125
|
+
'IAB17_44',
|
|
126
|
+
]);
|
|
127
|
+
expect(reqBidsConfigObj.ortb2Fragments.global.site.content.data[0].segment).to.eql([
|
|
128
|
+
{ id: '483' },
|
|
129
|
+
{ id: '533' }
|
|
130
|
+
]);
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
function getGoodConfig() {
|
|
137
|
+
return {
|
|
138
|
+
name: 'arcspan',
|
|
139
|
+
waitForIt: true,
|
|
140
|
+
params: {
|
|
141
|
+
silo: 13,
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function getBadConfig() {
|
|
147
|
+
return {
|
|
148
|
+
name: 'arcspan',
|
|
149
|
+
waitForIt: true,
|
|
150
|
+
params: {
|
|
151
|
+
notasilo: 1,
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function getTestConfig() {
|
|
157
|
+
return {
|
|
158
|
+
name: 'arcspan',
|
|
159
|
+
waitForIt: true,
|
|
160
|
+
params: {
|
|
161
|
+
silo: 'test',
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function setIAB(vjson) {
|
|
167
|
+
window.arcobj2 = {};
|
|
168
|
+
window.arcobj2.cat = 0;
|
|
169
|
+
if (typeof vjson.codes != 'undefined') {
|
|
170
|
+
window.arcobj2.cat = 1;
|
|
171
|
+
if (typeof vjson.codes.images != 'undefined') {
|
|
172
|
+
vjson.codes.images.forEach(function f(e, i) {
|
|
173
|
+
vjson.codes.images[i] = e.replace('-', '_');
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (typeof vjson.codes.text != 'undefined') {
|
|
177
|
+
vjson.codes.text.forEach(function f(e, i) {
|
|
178
|
+
vjson.codes.text[i] = e.replace('-', '_');
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
window.arcobj2.sampled = 1;
|
|
182
|
+
window.arcobj1 = {};
|
|
183
|
+
window.arcobj1.page_iab_codes = vjson.codes;
|
|
184
|
+
window.arcobj1.page_iab = vjson.raw;
|
|
185
|
+
window.arcobj1.page_iab_newcodes = vjson.newcodes;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
@@ -130,7 +130,7 @@ const getConfigCreative = () => {
|
|
|
130
130
|
creativeId: '34567erty',
|
|
131
131
|
width: 300,
|
|
132
132
|
height: 250,
|
|
133
|
-
ttl:
|
|
133
|
+
ttl: 300,
|
|
134
134
|
netRevenue: true,
|
|
135
135
|
}
|
|
136
136
|
}
|
|
@@ -145,7 +145,7 @@ const getConfigCreativeVideo = (isNoVast) => {
|
|
|
145
145
|
requestId: '6a204ce130280d',
|
|
146
146
|
width: 300,
|
|
147
147
|
height: 250,
|
|
148
|
-
ttl:
|
|
148
|
+
ttl: 300,
|
|
149
149
|
netRevenue: true,
|
|
150
150
|
}
|
|
151
151
|
}
|
|
@@ -395,7 +395,7 @@ const testsInterpretResponse = [
|
|
|
395
395
|
mediaType: 'video',
|
|
396
396
|
netRevenue: true,
|
|
397
397
|
requestId: '2def0c5b2a7f6e',
|
|
398
|
-
ttl:
|
|
398
|
+
ttl: 300,
|
|
399
399
|
vastXml,
|
|
400
400
|
vastUrl: 'data:text/xml;charset=utf-8;base64,' + btoa(vastXml.replace(/\\"/g, '"'))
|
|
401
401
|
}]
|
|
@@ -421,7 +421,7 @@ const testsInterpretResponse = [
|
|
|
421
421
|
mediaType: 'banner',
|
|
422
422
|
netRevenue: true,
|
|
423
423
|
requestId: '2def0c5b2a7f6e',
|
|
424
|
-
ttl:
|
|
424
|
+
ttl: 300,
|
|
425
425
|
width: 300
|
|
426
426
|
}]
|
|
427
427
|
},
|
|
@@ -505,7 +505,7 @@ const testsBuildBid = [
|
|
|
505
505
|
netRevenue: true,
|
|
506
506
|
vastXml: getConfigCreativeVideo().vastXml,
|
|
507
507
|
vastUrl: 'data:text/xml;charset=utf-8;base64,' + btoa(getConfigCreativeVideo().vastXml.replace(/\\"/g, '"')),
|
|
508
|
-
ttl:
|
|
508
|
+
ttl: 300,
|
|
509
509
|
}
|
|
510
510
|
},
|
|
511
511
|
{
|
|
@@ -535,7 +535,7 @@ const testsBuildBid = [
|
|
|
535
535
|
netRevenue: true,
|
|
536
536
|
vastXml: getConfigCreativeVideo().vastXml,
|
|
537
537
|
vastUrl: 'data:text/xml;charset=utf-8;base64,' + btoa(getConfigCreativeVideo().vastXml.replace(/\\"/g, '"')),
|
|
538
|
-
ttl:
|
|
538
|
+
ttl: 300,
|
|
539
539
|
}
|
|
540
540
|
},
|
|
541
541
|
{
|
|
@@ -552,7 +552,7 @@ const testsBuildBid = [
|
|
|
552
552
|
height: 250,
|
|
553
553
|
creativeId: getConfigCreative().creativeId,
|
|
554
554
|
ad: getConfigBannerBid().creative.banner.adm,
|
|
555
|
-
ttl:
|
|
555
|
+
ttl: 300,
|
|
556
556
|
netRevenue: true,
|
|
557
557
|
}
|
|
558
558
|
}
|
|
@@ -625,6 +625,52 @@ describe('Consumable BidAdapter', function () {
|
|
|
625
625
|
expect(opts.length).to.equal(1);
|
|
626
626
|
});
|
|
627
627
|
|
|
628
|
+
it('should return a sync url if iframe syncs are enabled and GDPR applies', function () {
|
|
629
|
+
let gdprConsent = {
|
|
630
|
+
consentString: 'GDPR_CONSENT_STRING',
|
|
631
|
+
gdprApplies: true,
|
|
632
|
+
}
|
|
633
|
+
let opts = spec.getUserSyncs(syncOptions, [AD_SERVER_RESPONSE], gdprConsent);
|
|
634
|
+
|
|
635
|
+
expect(opts.length).to.equal(1);
|
|
636
|
+
expect(opts[0].url).to.equal('https://sync.serverbid.com/ss/730181.html?gdpr=1&gdpr_consent=GDPR_CONSENT_STRING');
|
|
637
|
+
})
|
|
638
|
+
|
|
639
|
+
it('should return a sync url if iframe syncs are enabled and GDPR is undefined', function () {
|
|
640
|
+
let gdprConsent = {
|
|
641
|
+
consentString: 'GDPR_CONSENT_STRING',
|
|
642
|
+
gdprApplies: undefined,
|
|
643
|
+
}
|
|
644
|
+
let opts = spec.getUserSyncs(syncOptions, [AD_SERVER_RESPONSE], gdprConsent);
|
|
645
|
+
|
|
646
|
+
expect(opts.length).to.equal(1);
|
|
647
|
+
expect(opts[0].url).to.equal('https://sync.serverbid.com/ss/730181.html?gdpr=0&gdpr_consent=GDPR_CONSENT_STRING');
|
|
648
|
+
})
|
|
649
|
+
|
|
650
|
+
it('should return a sync url if iframe syncs are enabled and USP applies', function () {
|
|
651
|
+
let uspConsent = {
|
|
652
|
+
consentString: 'USP_CONSENT_STRING',
|
|
653
|
+
}
|
|
654
|
+
let opts = spec.getUserSyncs(syncOptions, [AD_SERVER_RESPONSE], {}, uspConsent);
|
|
655
|
+
|
|
656
|
+
expect(opts.length).to.equal(1);
|
|
657
|
+
expect(opts[0].url).to.equal('https://sync.serverbid.com/ss/730181.html?us_privacy=USP_CONSENT_STRING');
|
|
658
|
+
})
|
|
659
|
+
|
|
660
|
+
it('should return a sync url if iframe syncs are enabled, GDPR and USP applies', function () {
|
|
661
|
+
let gdprConsent = {
|
|
662
|
+
consentString: 'GDPR_CONSENT_STRING',
|
|
663
|
+
gdprApplies: true,
|
|
664
|
+
}
|
|
665
|
+
let uspConsent = {
|
|
666
|
+
consentString: 'USP_CONSENT_STRING',
|
|
667
|
+
}
|
|
668
|
+
let opts = spec.getUserSyncs(syncOptions, [AD_SERVER_RESPONSE], gdprConsent, uspConsent);
|
|
669
|
+
|
|
670
|
+
expect(opts.length).to.equal(1);
|
|
671
|
+
expect(opts[0].url).to.equal('https://sync.serverbid.com/ss/730181.html?gdpr=1&gdpr_consent=GDPR_CONSENT_STRING&us_privacy=USP_CONSENT_STRING');
|
|
672
|
+
})
|
|
673
|
+
|
|
628
674
|
it('should return a sync url if pixel syncs are enabled and some are returned from the server', function () {
|
|
629
675
|
let syncOptions = {'pixelEnabled': true};
|
|
630
676
|
let opts = spec.getUserSyncs(syncOptions, [AD_SERVER_RESPONSE]);
|
|
@@ -707,7 +707,7 @@ describe('emx_digital Adapter', function () {
|
|
|
707
707
|
}));
|
|
708
708
|
});
|
|
709
709
|
|
|
710
|
-
it('returns valid advertiser
|
|
710
|
+
it('returns valid advertiser domains', function () {
|
|
711
711
|
const bidResponse = utils.deepClone(serverResponse);
|
|
712
712
|
let result = spec.interpretResponse({body: bidResponse});
|
|
713
713
|
expect(result[0].meta.advertiserDomains).to.deep.equal(expectedResponse[0].meta.advertiserDomains);
|
|
@@ -724,6 +724,7 @@ describe('emx_digital Adapter', function () {
|
|
|
724
724
|
expect(syncs).to.not.be.an('undefined');
|
|
725
725
|
expect(syncs).to.have.lengthOf(1);
|
|
726
726
|
expect(syncs[0].type).to.equal('iframe');
|
|
727
|
+
expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html')
|
|
727
728
|
});
|
|
728
729
|
|
|
729
730
|
it('should pass gdpr params', function () {
|
|
@@ -734,6 +735,34 @@ describe('emx_digital Adapter', function () {
|
|
|
734
735
|
expect(syncs).to.have.lengthOf(1);
|
|
735
736
|
expect(syncs[0].type).to.equal('iframe');
|
|
736
737
|
expect(syncs[0].url).to.contains('gdpr=0');
|
|
738
|
+
expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html?gdpr=0&gdpr_consent=test')
|
|
739
|
+
});
|
|
740
|
+
|
|
741
|
+
it('should pass us_privacy string', function () {
|
|
742
|
+
let syncs = spec.getUserSyncs({ iframeEnabled: true }, {}, {}, {
|
|
743
|
+
consentString: 'test',
|
|
744
|
+
});
|
|
745
|
+
expect(syncs).to.not.be.an('undefined');
|
|
746
|
+
expect(syncs).to.have.lengthOf(1);
|
|
747
|
+
expect(syncs[0].type).to.equal('iframe');
|
|
748
|
+
expect(syncs[0].url).to.contains('usp=test');
|
|
749
|
+
});
|
|
750
|
+
|
|
751
|
+
it('should pass us_privacy and gdpr strings', function () {
|
|
752
|
+
let syncs = spec.getUserSyncs({ iframeEnabled: true }, {},
|
|
753
|
+
{
|
|
754
|
+
gdprApplies: true,
|
|
755
|
+
consentString: 'test'
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
consentString: 'test'
|
|
759
|
+
});
|
|
760
|
+
expect(syncs).to.not.be.an('undefined');
|
|
761
|
+
expect(syncs).to.have.lengthOf(1);
|
|
762
|
+
expect(syncs[0].type).to.equal('iframe');
|
|
763
|
+
expect(syncs[0].url).to.contains('gdpr=1');
|
|
764
|
+
expect(syncs[0].url).to.contains('usp=test');
|
|
765
|
+
expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html?gdpr=1&gdpr_consent=test&usp=test')
|
|
737
766
|
});
|
|
738
767
|
});
|
|
739
768
|
});
|
|
@@ -161,5 +161,34 @@ describe('holidBidAdapterTests', () => {
|
|
|
161
161
|
|
|
162
162
|
expect(userSyncs).to.deep.equal(expectedUserSyncs)
|
|
163
163
|
})
|
|
164
|
+
|
|
165
|
+
it('should return empty user syncs when responsetimemillis is not defined', () => {
|
|
166
|
+
const optionsType = {
|
|
167
|
+
iframeEnabled: true,
|
|
168
|
+
pixelEnabled: true,
|
|
169
|
+
}
|
|
170
|
+
const serverResponse = [
|
|
171
|
+
{
|
|
172
|
+
body: {
|
|
173
|
+
ext: {},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
]
|
|
177
|
+
const gdprConsent = {
|
|
178
|
+
gdprApplies: 1,
|
|
179
|
+
consentString: 'dkj49Sjmfjuj34as:12jaf90123hufabidfy9u23brfpoig',
|
|
180
|
+
}
|
|
181
|
+
const uspConsent = 'mkjvbiniwot4827obfoy8sdg8203gb'
|
|
182
|
+
const expectedUserSyncs = []
|
|
183
|
+
|
|
184
|
+
const userSyncs = spec.getUserSyncs(
|
|
185
|
+
optionsType,
|
|
186
|
+
serverResponse,
|
|
187
|
+
gdprConsent,
|
|
188
|
+
uspConsent
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
expect(userSyncs).to.deep.equal(expectedUserSyncs)
|
|
192
|
+
})
|
|
164
193
|
})
|
|
165
194
|
})
|
|
@@ -556,6 +556,17 @@ describe('kargo adapter tests', function () {
|
|
|
556
556
|
mediaType: 'video',
|
|
557
557
|
metadata: {},
|
|
558
558
|
currency: 'EUR'
|
|
559
|
+
},
|
|
560
|
+
6: {
|
|
561
|
+
id: 'bar',
|
|
562
|
+
cpm: 2.5,
|
|
563
|
+
adm: '',
|
|
564
|
+
admUrl: 'https://foobar.com/vast_adm',
|
|
565
|
+
width: 300,
|
|
566
|
+
height: 250,
|
|
567
|
+
mediaType: 'video',
|
|
568
|
+
metadata: {},
|
|
569
|
+
currency: 'EUR'
|
|
559
570
|
}
|
|
560
571
|
}}, {
|
|
561
572
|
currency: 'USD',
|
|
@@ -584,6 +595,11 @@ describe('kargo adapter tests', function () {
|
|
|
584
595
|
params: {
|
|
585
596
|
placementId: 'bar'
|
|
586
597
|
}
|
|
598
|
+
}, {
|
|
599
|
+
bidId: 6,
|
|
600
|
+
params: {
|
|
601
|
+
placementId: 'bar'
|
|
602
|
+
}
|
|
587
603
|
}]
|
|
588
604
|
});
|
|
589
605
|
var expectation = [{
|
|
@@ -664,6 +680,22 @@ describe('kargo adapter tests', function () {
|
|
|
664
680
|
meta: {
|
|
665
681
|
mediaType: 'video'
|
|
666
682
|
}
|
|
683
|
+
}, {
|
|
684
|
+
requestId: '6',
|
|
685
|
+
cpm: 2.5,
|
|
686
|
+
width: 300,
|
|
687
|
+
height: 250,
|
|
688
|
+
ad: '',
|
|
689
|
+
vastUrl: 'https://foobar.com/vast_adm',
|
|
690
|
+
ttl: 300,
|
|
691
|
+
creativeId: 'bar',
|
|
692
|
+
dealId: undefined,
|
|
693
|
+
netRevenue: true,
|
|
694
|
+
currency: 'EUR',
|
|
695
|
+
mediaType: 'video',
|
|
696
|
+
meta: {
|
|
697
|
+
mediaType: 'video'
|
|
698
|
+
}
|
|
667
699
|
}];
|
|
668
700
|
expect(resp).to.deep.equal(expectation);
|
|
669
701
|
});
|
|
@@ -18,6 +18,7 @@ describe('LotameId', function() {
|
|
|
18
18
|
let removeFromLocalStorageStub;
|
|
19
19
|
let timeStampStub;
|
|
20
20
|
let uspConsentDataStub;
|
|
21
|
+
let requestHost;
|
|
21
22
|
|
|
22
23
|
const nowTimestamp = new Date().getTime();
|
|
23
24
|
|
|
@@ -33,6 +34,11 @@ describe('LotameId', function() {
|
|
|
33
34
|
);
|
|
34
35
|
timeStampStub = sinon.stub(utils, 'timestamp').returns(nowTimestamp);
|
|
35
36
|
uspConsentDataStub = sinon.stub(uspDataHandler, 'getConsentData');
|
|
37
|
+
if (navigator.userAgent && navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
|
|
38
|
+
requestHost = 'https://c.ltmsphrcl.net/id';
|
|
39
|
+
} else {
|
|
40
|
+
requestHost = 'https://id.crwdcntrl.net/id';
|
|
41
|
+
}
|
|
36
42
|
});
|
|
37
43
|
|
|
38
44
|
afterEach(function () {
|
|
@@ -69,7 +75,7 @@ describe('LotameId', function() {
|
|
|
69
75
|
});
|
|
70
76
|
|
|
71
77
|
it('should call the remote server when getId is called', function () {
|
|
72
|
-
expect(request.url).to.be.eq(
|
|
78
|
+
expect(request.url).to.be.eq(`${requestHost}`);
|
|
73
79
|
expect(callBackSpy.calledOnce).to.be.true;
|
|
74
80
|
});
|
|
75
81
|
|
|
@@ -439,7 +445,7 @@ describe('LotameId', function() {
|
|
|
439
445
|
|
|
440
446
|
it('should pass the gdpr consent string back', function() {
|
|
441
447
|
expect(request.url).to.be.eq(
|
|
442
|
-
|
|
448
|
+
`${requestHost}?gdpr_applies=true&gdpr_consent=consentGiven`
|
|
443
449
|
);
|
|
444
450
|
});
|
|
445
451
|
});
|
|
@@ -471,7 +477,7 @@ describe('LotameId', function() {
|
|
|
471
477
|
|
|
472
478
|
it('should pass the gdpr consent string back', function() {
|
|
473
479
|
expect(request.url).to.be.eq(
|
|
474
|
-
|
|
480
|
+
`${requestHost}?gdpr_applies=true&gdpr_consent=consentGiven`
|
|
475
481
|
);
|
|
476
482
|
});
|
|
477
483
|
});
|
|
@@ -503,7 +509,7 @@ describe('LotameId', function() {
|
|
|
503
509
|
|
|
504
510
|
it('should pass the gdpr consent string back', function() {
|
|
505
511
|
expect(request.url).to.be.eq(
|
|
506
|
-
|
|
512
|
+
`${requestHost}?gdpr_applies=true&gdpr_consent=consentGiven`
|
|
507
513
|
);
|
|
508
514
|
});
|
|
509
515
|
});
|
|
@@ -531,7 +537,7 @@ describe('LotameId', function() {
|
|
|
531
537
|
|
|
532
538
|
it('should not include the gdpr consent string on the url', function() {
|
|
533
539
|
expect(request.url).to.be.eq(
|
|
534
|
-
|
|
540
|
+
`${requestHost}?gdpr_applies=true`
|
|
535
541
|
);
|
|
536
542
|
});
|
|
537
543
|
});
|
|
@@ -560,7 +566,7 @@ describe('LotameId', function() {
|
|
|
560
566
|
|
|
561
567
|
it('should pass the gdpr consent string back', function() {
|
|
562
568
|
expect(request.url).to.be.eq(
|
|
563
|
-
|
|
569
|
+
`${requestHost}?gdpr_consent=consentGiven`
|
|
564
570
|
);
|
|
565
571
|
});
|
|
566
572
|
});
|
|
@@ -589,7 +595,7 @@ describe('LotameId', function() {
|
|
|
589
595
|
|
|
590
596
|
it('should pass the gdpr consent string back', function() {
|
|
591
597
|
expect(request.url).to.be.eq(
|
|
592
|
-
|
|
598
|
+
`${requestHost}?gdpr_consent=consentGiven`
|
|
593
599
|
);
|
|
594
600
|
});
|
|
595
601
|
});
|
|
@@ -613,7 +619,7 @@ describe('LotameId', function() {
|
|
|
613
619
|
});
|
|
614
620
|
|
|
615
621
|
it('should pass the gdpr consent string back', function() {
|
|
616
|
-
expect(request.url).to.be.eq(
|
|
622
|
+
expect(request.url).to.be.eq(`${requestHost}`);
|
|
617
623
|
});
|
|
618
624
|
});
|
|
619
625
|
|
|
@@ -835,7 +841,7 @@ describe('LotameId', function() {
|
|
|
835
841
|
|
|
836
842
|
it('should pass the usp consent string and client id back', function () {
|
|
837
843
|
expect(request.url).to.be.eq(
|
|
838
|
-
|
|
844
|
+
`${requestHost}?gdpr_applies=false&us_privacy=1NNN&c=1234`
|
|
839
845
|
);
|
|
840
846
|
});
|
|
841
847
|
|
|
@@ -923,7 +929,7 @@ describe('LotameId', function() {
|
|
|
923
929
|
|
|
924
930
|
it('should pass client id back', function () {
|
|
925
931
|
expect(request.url).to.be.eq(
|
|
926
|
-
|
|
932
|
+
`${requestHost}?gdpr_applies=false&c=1234`
|
|
927
933
|
);
|
|
928
934
|
});
|
|
929
935
|
|
|
@@ -49,7 +49,7 @@ describe('nextMillenniumBidAdapterTests', function() {
|
|
|
49
49
|
cur: 'USD',
|
|
50
50
|
ext: {
|
|
51
51
|
sync: {
|
|
52
|
-
image: ['urlA'],
|
|
52
|
+
image: ['urlA?gdpr={{.GDPR}}'],
|
|
53
53
|
iframe: ['urlB'],
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -132,7 +132,7 @@ describe('nextMillenniumBidAdapterTests', function() {
|
|
|
132
132
|
let userSync = spec.getUserSyncs(syncOptions, [serverResponse], bidRequestData[0].gdprConsent, bidRequestData[0].uspConsent);
|
|
133
133
|
expect(userSync).to.be.an('array').with.lengthOf(1);
|
|
134
134
|
expect(userSync[0].type).to.equal('image');
|
|
135
|
-
expect(userSync[0].url).to.equal('urlA');
|
|
135
|
+
expect(userSync[0].url).to.equal('urlA?gdpr=1');
|
|
136
136
|
|
|
137
137
|
syncOptions.iframeEnabled = true;
|
|
138
138
|
syncOptions.pixelEnabled = false;
|
|
@@ -142,6 +142,18 @@ describe('nextMillenniumBidAdapterTests', function() {
|
|
|
142
142
|
expect(userSync[0].url).to.equal('urlB');
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
+
it('Test getUserSyncs function if GDPR is undefined', function () {
|
|
146
|
+
const syncOptions = {
|
|
147
|
+
'iframeEnabled': false,
|
|
148
|
+
'pixelEnabled': true
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
let userSync = spec.getUserSyncs(syncOptions, [serverResponse], undefined, bidRequestData[0].uspConsent);
|
|
152
|
+
expect(userSync).to.be.an('array').with.lengthOf(1);
|
|
153
|
+
expect(userSync[0].type).to.equal('image');
|
|
154
|
+
expect(userSync[0].url).to.equal('urlA?gdpr=0');
|
|
155
|
+
});
|
|
156
|
+
|
|
145
157
|
it('Request params check without GDPR Consent', function () {
|
|
146
158
|
delete bidRequestData[0].gdprConsent
|
|
147
159
|
const request = spec.buildRequests(bidRequestData, bidRequestData[0]);
|
|
@@ -1729,6 +1729,47 @@ describe('OpenxAdapter', function () {
|
|
|
1729
1729
|
});
|
|
1730
1730
|
});
|
|
1731
1731
|
});
|
|
1732
|
+
describe('with user agent client hints', function () {
|
|
1733
|
+
it('should add json query param sua with BidRequest.device.sua if available', function () {
|
|
1734
|
+
const bidderRequestWithUserAgentClientHints = { refererInfo: {},
|
|
1735
|
+
ortb2: {
|
|
1736
|
+
device: {
|
|
1737
|
+
sua: {
|
|
1738
|
+
source: 2,
|
|
1739
|
+
platform: {
|
|
1740
|
+
brand: 'macOS',
|
|
1741
|
+
version: [ '12', '4', '0' ]
|
|
1742
|
+
},
|
|
1743
|
+
browsers: [
|
|
1744
|
+
{
|
|
1745
|
+
brand: 'Chromium',
|
|
1746
|
+
version: [ '106', '0', '5249', '119' ]
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
brand: 'Google Chrome',
|
|
1750
|
+
version: [ '106', '0', '5249', '119' ]
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
brand: 'Not;A=Brand',
|
|
1754
|
+
version: [ '99', '0', '0', '0' ]
|
|
1755
|
+
}],
|
|
1756
|
+
mobile: 0,
|
|
1757
|
+
model: 'Pro',
|
|
1758
|
+
bitness: '64',
|
|
1759
|
+
architecture: 'x86'
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
}};
|
|
1763
|
+
|
|
1764
|
+
let request = spec.buildRequests([bidRequest], bidderRequestWithUserAgentClientHints);
|
|
1765
|
+
expect(request[0].data.sua).to.exist;
|
|
1766
|
+
const payload = JSON.parse(request[0].data.sua);
|
|
1767
|
+
expect(payload).to.deep.equal(bidderRequestWithUserAgentClientHints.ortb2.device.sua);
|
|
1768
|
+
const bidderRequestWithoutUserAgentClientHints = {refererInfo: {}, ortb2: {}};
|
|
1769
|
+
request = spec.buildRequests([bidRequest], bidderRequestWithoutUserAgentClientHints);
|
|
1770
|
+
expect(request[0].data.sua).to.not.exist;
|
|
1771
|
+
});
|
|
1772
|
+
});
|
|
1732
1773
|
});
|
|
1733
1774
|
})
|
|
1734
1775
|
|
|
@@ -579,6 +579,47 @@ describe('OpenxRtbAdapter', function () {
|
|
|
579
579
|
});
|
|
580
580
|
});
|
|
581
581
|
});
|
|
582
|
+
|
|
583
|
+
describe('with user agent client hints', function () {
|
|
584
|
+
it('should add device.sua if available', function () {
|
|
585
|
+
const bidderRequestWithUserAgentClientHints = { refererInfo: {},
|
|
586
|
+
ortb2: {
|
|
587
|
+
device: {
|
|
588
|
+
sua: {
|
|
589
|
+
source: 2,
|
|
590
|
+
platform: {
|
|
591
|
+
brand: 'macOS',
|
|
592
|
+
version: [ '12', '4', '0' ]
|
|
593
|
+
},
|
|
594
|
+
browsers: [
|
|
595
|
+
{
|
|
596
|
+
brand: 'Chromium',
|
|
597
|
+
version: [ '106', '0', '5249', '119' ]
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
brand: 'Google Chrome',
|
|
601
|
+
version: [ '106', '0', '5249', '119' ]
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
brand: 'Not;A=Brand',
|
|
605
|
+
version: [ '99', '0', '0', '0' ]
|
|
606
|
+
}],
|
|
607
|
+
mobile: 0,
|
|
608
|
+
model: 'Pro',
|
|
609
|
+
bitness: '64',
|
|
610
|
+
architecture: 'x86'
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}};
|
|
614
|
+
|
|
615
|
+
let request = spec.buildRequests(bidRequests, bidderRequestWithUserAgentClientHints);
|
|
616
|
+
expect(request[0].data.device.sua).to.exist;
|
|
617
|
+
expect(request[0].data.device.sua).to.deep.equal(bidderRequestWithUserAgentClientHints.ortb2.device.sua);
|
|
618
|
+
const bidderRequestWithoutUserAgentClientHints = {refererInfo: {}, ortb2: {}};
|
|
619
|
+
request = spec.buildRequests(bidRequests, bidderRequestWithoutUserAgentClientHints);
|
|
620
|
+
expect(request[0].data.device?.sua).to.not.exist;
|
|
621
|
+
});
|
|
622
|
+
});
|
|
582
623
|
});
|
|
583
624
|
|
|
584
625
|
context('when there is a consent management framework', function () {
|