Skip to content

Commit 314dd35

Browse files
authored
Merge pull request #55 from jwplayer/feat/GRO-291
[GRO-291]
2 parents d073266 + f90e552 commit 314dd35

File tree

3 files changed

+638
-158
lines changed

3 files changed

+638
-158
lines changed
Lines changed: 333 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,333 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<script async src="../../../build/dev/prebid.js"></script>
5+
<!-- OneTrust CMP Builder start -->
6+
<script src="https://cmp-cdn.cookielaw.org/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8" data-cmp-builder-version="1.8.0" data-domain-script="bottom-center-default-global-ot"></script>
7+
<script>
8+
function OptanonWrapper() {
9+
addCmpBuilderFeatures();
10+
function addCmpBuilderFeatures() {
11+
var existingCmpFeaturesScript = document.getElementById('cmp-builder-features-script');
12+
if(!existingCmpFeaturesScript) {
13+
var cmpFeaturesScript = document.createElement('script'),script1 = document.getElementsByTagName('script')[0];
14+
cmpFeaturesScript.src = "https://cmp-cdn.cookielaw.org/consent/cmp-features/cmp-features.js";
15+
cmpFeaturesScript.setAttribute('id', 'cmp-builder-features-script');
16+
cmpFeaturesScript.async = false;
17+
cmpFeaturesScript.type = 'text/javascript';
18+
script1.parentNode.insertBefore(cmpFeaturesScript, script1);
19+
}
20+
}
21+
}
22+
</script>
23+
<!-- OneTrust CMP Builder end -->
24+
25+
<script>
26+
var adUnits = [{
27+
code: 'test-div',
28+
mediaTypes: {
29+
video: {
30+
sizes: [[300,250]],
31+
mimes : ["video/x-ms-wmv", "video/mp4"],
32+
minduration : 0,
33+
maxduration: 3,
34+
protocols : [1,2]
35+
}
36+
},
37+
bids: [{
38+
bidder: 'jwplayer',
39+
params: {
40+
publisherId: 'abcd',
41+
siteId: 'siteId',
42+
placementId: '13144370'
43+
}
44+
}]
45+
}];
46+
47+
var pbjs = pbjs || {};
48+
pbjs.que = pbjs.que || [];
49+
function getHashedEmail() { }
50+
51+
pbjs.que.push(function() {
52+
pbjs.setConfig({
53+
debug: true,
54+
ortb2: {
55+
test: 1,
56+
site: {
57+
publisher: {
58+
id: "aufeminin"
59+
},
60+
content: {
61+
url: 'test.mp4',
62+
},
63+
domain: "aufeminin.com",
64+
page: 'https://www.aufeminin.com/soins-visage/je-suis-dermatologue-et-voici-la-regle-d-or-pour-avoir-une-belle-peau-sans-bouton-s4068047.html',
65+
}
66+
},
67+
consentManagement: {
68+
cmpApi: 'iab',
69+
timeout: 5000,
70+
allowAuctionWithoutConsent: true
71+
},
72+
// "debug": true,
73+
// *************************************************************************
74+
// ** COMMENT consentManagement BLOCK IF YOU DO NOT WANT TO SIMULATE GDPR **
75+
// *************************************************************************
76+
// "consentManagement": {
77+
// "cmpApi": "static",
78+
// "consentData": {
79+
// "getTCData": {
80+
// "tcString": "CO-HDlqO-HDlqAKAXCENBDCsAP_AAH_AACiQHKNd_X_fb39j-_59_9t0eY1f9_7_v20zjgeds-8Nyd_X_L8X42M7vF36pq4KuR4Eu3LBIQFlHOHcTUmw6IkVqTPsak2Mr7NKJ7PEinMbe2dYGHtfn9VTuZKYr97s___z__-__v__75f_r-3_3_vp9V---_fA5QAkw1L4CLMSxwJJo0qhRAhCuJDoAQAUUIwtE1hASuCnZXAR-ggYAIDUBGBECDEFGLIIAAAAAkoiAkAPBAIgCIBAACAFSAhAARoAgsAJAwCAAUA0LACKAIQJCDI4KjlMCAiRaKCeSMASi72MMIQyigBoFH4AAAAA.cAAAAAAAAAAA",
81+
// "cmpId": 10,
82+
// "cmpVersion": 23,
83+
// "tcfPolicyVersion": 2,
84+
// "gdprApplies": true,
85+
// "cmpStatus": "loaded",
86+
// "eventStatus": "tcloaded",
87+
// "purpose": {
88+
// "consents": {
89+
// "1": true,
90+
// "2": true
91+
// }
92+
// },
93+
// "vendor": {
94+
// "consents": {
95+
// // add your GVL ID here and set to true to give consent within pbjs
96+
// 1046: true,
97+
// "52": true, // rubicon for adserving
98+
// "21": true, // unifiedId
99+
// "131": true, // id5Id
100+
// "929": true, // parrableId
101+
// "97": true, // identityLink
102+
// "887": true, // uid2
103+
// "95": true, // lotamePanoramaId
104+
// "301": true, // zeotapIdPlus
105+
// "91": true, // criteo
106+
// "737": true, // amxId
107+
// "58": true, // 33acrossId
108+
// }
109+
// }
110+
// }
111+
// }
112+
// },
113+
"userSync": {
114+
"userIds": [
115+
{
116+
"name": "pubProvidedId",
117+
"params": {
118+
"eids": [
119+
{
120+
"source": "domain.com",
121+
"uids": [
122+
{
123+
"id": "value read from cookie or local storage",
124+
"atype": 1,
125+
"ext": {
126+
"stype": "ppuid" // allowable options are sha256email, DMP, ppuid for now
127+
}
128+
}
129+
]
130+
},
131+
{
132+
"source": "3rdpartyprovided.com",
133+
"uids": [
134+
{
135+
"id": "value read from cookie or local storage",
136+
"atype": 3,
137+
"ext": {
138+
"stype": "sha256email"
139+
}
140+
}
141+
]
142+
}
143+
],
144+
"eidsFunction": getHashedEmail // any user defined function that exists in the page
145+
}
146+
},
147+
{
148+
"name": "unifiedId",
149+
"params": {
150+
"partner": "prebid",
151+
"url": "http://match.adsrvr.org/track/rid?ttd_pid=prebid&fmt=json"
152+
},
153+
"storage": {
154+
"type": "html5",
155+
"name": "unifiedid",
156+
"expires": 30
157+
}
158+
},
159+
{
160+
"name": "33acrossId",
161+
"params": {
162+
"pid": '0'
163+
},
164+
"storage": {
165+
"type": 'html5',
166+
"name": '33acrossId',
167+
"expires": 90
168+
}
169+
},
170+
{
171+
"name": "intentIqId",
172+
"params": {
173+
"partner": 0 // Set your real IntentIQ partner ID here for production.
174+
},
175+
"storage": {
176+
"type": "cookie",
177+
"name": "intentIqId",
178+
"expires": 30
179+
}
180+
},
181+
{
182+
"name": "id5Id",
183+
"params": {
184+
"partner": 173 // Set your real ID5 partner ID here for production, please ask for one at http://id5.io/prebid
185+
},
186+
"storage": {
187+
"type": "html5",
188+
"name": "id5id",
189+
"expires": 90,
190+
"refreshInSeconds": 10// 8*3600 // Refresh frequency of cookies
191+
}
192+
},
193+
{
194+
"name": "merkleId",
195+
"params": {
196+
"endpoint": "https://test_endpoint/",
197+
"vendor": "sdfg",
198+
"sv_cid": "dfg",
199+
"sv_pubid": "xcv",
200+
"sv_domain": "zxv"
201+
},
202+
"storage": {
203+
"type": "html5",
204+
"name": "merkleId",
205+
"expires": 30
206+
}
207+
},
208+
{
209+
"name": "parrableId",
210+
"params": {
211+
// change to Parrable Partner Client ID(s) you received from the Parrable Partners you are using
212+
"partner": "30182847-e426-4ff9-b2b5-9ca1324ea09b"
213+
}
214+
},
215+
{
216+
"name": "pubCommonId",
217+
"storage": {
218+
"type": "cookie",
219+
"name": "pubcid",
220+
"expires": 365
221+
}
222+
// value: {
223+
// foo: '9879878907987',
224+
// bar:'93939'
225+
// }
226+
},
227+
{
228+
"name": "identityLink",
229+
"params": {
230+
"pid": "14" // Set your real identityLink placement ID here
231+
// use3P: false // true/false - If you want to use 3P endpoint to retrieve envelope. If you do not set this property to true, 3p endpoint will not be fired. By default this property is undefined and 3p request will not be fired.
232+
},
233+
"storage": {
234+
"type": "cookie",
235+
"name": "idl_env",
236+
"expires": 30
237+
}
238+
},
239+
{
240+
"name": "lotamePanoramaId"
241+
},
242+
{
243+
"name": "liveIntentId",
244+
"params": {
245+
"publisherId": "9896876"
246+
},
247+
"storage": {
248+
"type": "cookie",
249+
"name": "_li_pbid",
250+
"expires": 28
251+
}
252+
},
253+
{
254+
"name": "zeotapIdPlus"
255+
},
256+
{
257+
"name": "hadronId",
258+
"storage": {
259+
"type": "cookie",
260+
"name": "hadronId",
261+
"expires": 28
262+
}
263+
},
264+
{
265+
"name": "quantcastId"
266+
},
267+
{
268+
"name": "criteo"
269+
},
270+
{
271+
"name": "amxId",
272+
"storage": {
273+
"type": "html5",
274+
"name": "amxId",
275+
"expires": 14
276+
}
277+
},
278+
{
279+
"name": "uid2",
280+
"params": {
281+
"uid2ApiBase": "https://operator-integ.uidapi.com", // Omit this setting for production
282+
"uid2Token": {
283+
"advertising_token": "advertising token goes here",
284+
"refresh_token": "refresh token goes here",
285+
"identity_expires": Date.now() + 60*1000, // These timestamps should be from the token generate response
286+
"refresh_from": Date.now() - 10*1000,
287+
"refresh_expires": Date.now() + 12*60*60*1000,
288+
"refresh_response_key": "refresh key goes here"
289+
}
290+
}
291+
},
292+
{
293+
"name": "euid",
294+
"params": {
295+
"euidApiBase": "https://integ.euid.eu", // Omit this setting for production
296+
"euidToken": {
297+
"advertising_token": "advertising token goes here",
298+
"refresh_token": "refresh token goes here",
299+
"identity_expires": Date.now() + 60*1000, // These timestamps should be from the token generate response
300+
"refresh_from": Date.now() - 10*1000,
301+
"refresh_expires": Date.now() + 12*60*60*1000,
302+
"refresh_response_key": "refresh key goes here"
303+
}
304+
}
305+
},
306+
{
307+
"name": "imuid",
308+
"params": {
309+
"cid": 5126 // Set your Intimate Merger Customer ID here for production
310+
}
311+
},
312+
{
313+
"name": "dacId"
314+
},
315+
{
316+
"name": "gravitompId"
317+
}
318+
],
319+
"syncDelay": 5000,
320+
"auctionDelay": 1000
321+
}
322+
});
323+
pbjs.addAdUnits(adUnits);
324+
pbjs.requestBids({
325+
timeout: 4000
326+
});
327+
});
328+
</script>
329+
</head>
330+
<body>
331+
332+
</body>
333+
</html>

0 commit comments

Comments
 (0)