Skip to content

Commit 031ebf1

Browse files
committed
Merge branch 'master' into NoBid-Version-1.2.4
* master: (49 commits) Submitting Clicktripz bid adapter (prebid#4929) add UNICORN bid adapter (prebid#4917) 3.12.0-pre 3.11.0 release Eids liveintent ext fix (prebid#4944) add mediaforce bid adapter (prebid#4933) update logic in adpod module for playersize (prebid#4953) Module - Size Mapping V2 (prebid#4690) Lifestreet adapter 3.0 (prebid#4927) IX Adapter - Increase banner TTL to 300s (prebid#4957) assert string returned not that we break things (prebid#4962) added option to url parser to ignore decoding entire url (prebid#4938) adding user-id support in medianet adapter (prebid#4925) removing the log (prebid#4960) add import extensions (prebid#4959) Add 7xbid adapter to compatible with prebid 3.0 (prebid#4908) Fix failing code-coverage command (prebid#4892) enable no-console eslint rule for project (prebid#4802) update audigent tests to fix larger test suite issue (prebid#4952) use bidId or bidIds in the payload (prebid#4903) ...
2 parents 6e618f3 + 36fab76 commit 031ebf1

File tree

132 files changed

+16480
-554
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+16480
-554
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module.exports = {
3939
"no-throw-literal": "off",
4040
"no-undef": 2,
4141
"no-useless-escape": "off",
42+
"no-console": "error"
4243
},
4344
"overrides": Object.keys(allowedModules).map((key) => ({
4445
"files": key + "/**/*.js",

gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function viewCoverage(done) {
8484

8585
connect.server({
8686
port: coveragePort,
87-
root: 'build/coverage/karma_html',
87+
root: 'build/coverage/lcov-report',
8888
livereload: false
8989
});
9090
opens('http://' + mylocalhost + ':' + coveragePort);
@@ -328,7 +328,7 @@ function setupE2e(done) {
328328

329329
gulp.task('updatepath', function(){
330330
return gulp.src(['build/dist/*.js'])
331-
.pipe(replace('ib.adnxs.com/ut/v3/prebid', host + ':' + mockServerPort + '/'))
331+
.pipe(replace('https://ib.adnxs.com/ut/v3/prebid', 'http://' + host + ':' + mockServerPort + '/'))
332332
.pipe(gulp.dest('build/dist'));
333333
});
334334

Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
<html>
2+
<head>
3+
<script>
4+
(function(window, document) {
5+
if (!window.__cmp) {
6+
window.__cmp = (function() {
7+
var listen = window.attachEvent || window.addEventListener;
8+
listen('message', function(event) {
9+
window.__cmp.receiveMessage(event);
10+
}, false);
11+
12+
function addLocatorFrame() {
13+
if (!window.frames['__cmpLocator']) {
14+
if (document.body) {
15+
var frame = document.createElement('iframe');
16+
frame.style.display = 'none';
17+
frame.name = '__cmpLocator';
18+
document.body.appendChild(frame);
19+
} else {
20+
setTimeout(addLocatorFrame, 5);
21+
}
22+
}
23+
}
24+
addLocatorFrame();
25+
26+
var commandQueue = [];
27+
var cmp = function(command, parameter, callback) {
28+
if (command === 'ping') {
29+
if (callback) {
30+
callback({
31+
gdprAppliesGlobally: !!(window.__cmp && window.__cmp.config && window.__cmp.config.storeConsentGlobally),
32+
cmpLoaded: false
33+
});
34+
}
35+
} else {
36+
commandQueue.push({
37+
command: command,
38+
parameter: parameter,
39+
callback: callback
40+
});
41+
}
42+
};
43+
cmp.commandQueue = commandQueue;
44+
cmp.receiveMessage = function(event) {
45+
var data = event && event.data && event.data.__cmpCall;
46+
if (data) {
47+
commandQueue.push({
48+
callId: data.callId,
49+
command: data.command,
50+
parameter: data.parameter,
51+
event: event
52+
});
53+
}
54+
};
55+
cmp.config = {
56+
//
57+
// Modify config values here
58+
//
59+
// globalVendorListLocation: 'https://vendorlist.consensu.org/vendorlist.json',
60+
// customPurposeListLocation: './purposes.json',
61+
// globalConsentLocation: './portal.html',
62+
// storeConsentGlobally: false,
63+
// storePublisherData: false,
64+
logging: 'debug'//,
65+
// localization: {},
66+
// forceLocale: 'en-us'
67+
};
68+
return cmp;
69+
}());
70+
var t = document.createElement('script');
71+
t.async = false;
72+
t.src = 'http://acdn.adnxs.com/cmp/cmp.bundle.js';
73+
var tag = document.getElementsByTagName('head')[0];
74+
tag.appendChild(t);
75+
}
76+
})(window, document);
77+
// window.__cmp('showConsentTool');
78+
</script>
79+
80+
<script>
81+
var FAILSAFE_TIMEOUT = 2000;
82+
83+
var adUnits = [
84+
{
85+
code: 'test-div',
86+
mediaTypes: {
87+
banner: {
88+
sizes: [[300,250],[300,600],[728,90]]
89+
}
90+
},
91+
92+
bids: [
93+
{
94+
bidder: 'rubicon',
95+
params: {
96+
accountId: '1001',
97+
siteId: '113932',
98+
zoneId: '535510'
99+
}
100+
}
101+
]
102+
}
103+
];
104+
105+
var pbjs = pbjs || {};
106+
pbjs.que = pbjs.que || [];
107+
</script>
108+
<script src="../../build/dev/prebid.js" async></script>
109+
110+
<script>
111+
var googletag = googletag || {};
112+
googletag.cmd = googletag.cmd || [];
113+
googletag.cmd.push(function() {
114+
googletag.pubads().disableInitialLoad();
115+
});
116+
117+
pbjs.que.push(function() {
118+
pbjs.setConfig({
119+
debug: true,
120+
consentManagement: {
121+
cmpApi: 'iab',
122+
timeout: 1000,
123+
allowAuctionWithoutConsent: true
124+
},
125+
// consentManagement: {
126+
// cmpApi: 'static',
127+
// consentData: {
128+
// consentString: 'BOEFEAyOEFEAyAHABDENAI4AAAB9vABAASA'
129+
// vendorData: {
130+
// purposeConsents: {
131+
// '1': true
132+
// }
133+
// }
134+
// }
135+
// },
136+
usersync: {
137+
userIds: [{
138+
name: "unifiedId",
139+
params: {
140+
partner: "prebid",
141+
url: "http://match.adsrvr.org/track/rid?ttd_pid=prebid&fmt=json"
142+
},
143+
storage: {
144+
type: "html5",
145+
name: "unifiedid",
146+
expires: 30
147+
},
148+
}, {
149+
name: "id5Id",
150+
params: {
151+
partner: 173 //Set your real ID5 partner ID here for production, please ask for one at http://id5.io/prebid
152+
},
153+
storage: {
154+
type: "cookie",
155+
name: "id5id",
156+
expires: 90,
157+
refreshInSeconds: 8*3600 // Refresh frequency of cookies, defaulting to 'expires'
158+
},
159+
160+
}, {
161+
name: "parrableId",
162+
params: {
163+
// change to Parrable Partner Client ID(s) you received from the Parrable Partners you are using
164+
partner: '30182847-e426-4ff9-b2b5-9ca1324ea09b'
165+
},
166+
storage: {
167+
type: "cookie",
168+
name: "_parrable_eid", // create a cookie with this name
169+
expires: 365 // cookie can last for a year
170+
}
171+
}, {
172+
name: "pubCommonId",
173+
storage: {
174+
type: "cookie",
175+
name: "pubcid",
176+
expires: 365
177+
},
178+
// value: {
179+
// foo: '9879878907987',
180+
// bar:'93939'
181+
// }
182+
}, {
183+
name: 'identityLink',
184+
params: {
185+
pid: '14' // Set your real identityLink placement ID here
186+
},
187+
storage: {
188+
type: 'cookie',
189+
name: 'idl_env',
190+
expires: 30
191+
}
192+
}],
193+
syncDelay: 5000,
194+
auctionDelay: 1000
195+
},
196+
realTimeData: {
197+
auctionDelay: 1000,
198+
dataProviders: [{name: "audigent"}]
199+
}
200+
});
201+
pbjs.addAdUnits(adUnits);
202+
pbjs.requestBids({bidsBackHandler: sendAdserverRequest});
203+
});
204+
205+
function sendAdserverRequest() {
206+
document.getElementById('tdid').innerHTML = adUnits[0].bids[0].userId['tdid'];
207+
document.getElementById('audigent_segments').innerHTML = JSON.stringify(adUnits[0].bids[0].realTimeData.audigent_segments);
208+
209+
if (pbjs.adserverRequestSent) return;
210+
pbjs.adserverRequestSent = true;
211+
googletag.cmd.push(function() {
212+
pbjs.que.push(function() {
213+
pbjs.setTargetingForGPTAsync();
214+
googletag.pubads().refresh();
215+
});
216+
});
217+
}
218+
219+
setTimeout(function() {
220+
sendAdserverRequest();
221+
}, FAILSAFE_TIMEOUT);
222+
</script>
223+
224+
<script>
225+
(function () {
226+
var gads = document.createElement('script');
227+
gads.async = true;
228+
gads.type = 'text/javascript';
229+
var useSSL = 'https:' == document.location.protocol;
230+
gads.src = (useSSL ? 'https:' : 'http:') +
231+
'//www.googletagservices.com/tag/js/gpt.js';
232+
var node = document.getElementsByTagName('script')[0];
233+
node.parentNode.insertBefore(gads, node);
234+
})();
235+
</script>
236+
237+
<script>
238+
googletag.cmd.push(function() {
239+
googletag.defineSlot('/112115922/FL_PB_MedRect', [[300, 250],[300,600]], 'test-div').addService(googletag.pubads());
240+
googletag.pubads().enableSingleRequest();
241+
googletag.enableServices();
242+
});
243+
</script>
244+
</head>
245+
246+
<body>
247+
<h2>Audigent Segments Prebid</h2>
248+
249+
<div id='test-div'>
250+
<script>
251+
googletag.cmd.push(function() { googletag.display('test-div'); });
252+
</script>
253+
</div>
254+
TDID:
255+
<div id='tdid'>
256+
</div>
257+
258+
Audigent Segments:
259+
<div id='audigent_segments'>
260+
</div>
261+
</body>
262+
</html>

0 commit comments

Comments
 (0)