-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathraveltechRtdProvider_example.html
More file actions
380 lines (360 loc) · 11.9 KB
/
raveltechRtdProvider_example.html
File metadata and controls
380 lines (360 loc) · 11.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
<!-- each id module, for it to work, needs to be embedded in prebid.js bundle -->
<!-- see https://docs.prebid.org/dev-docs/modules/userId.html -->
<!-- for publisher to provide their own IDs, they can use the pubProvidedIdSystem module -->
<!-- see https://docs.prebid.org/dev-docs/modules/userid-submodules/pubprovided.html -->
<!-- this file can be tested with -->
<!-- gulp serve --notest --modules=rtdModule,raveltechRtdProvider,appnexusBidAdapter,userId -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>User ID Modules Example</title>
<script>
var FAILSAFE_TIMEOUT = 2000;
var adUnits = [
{
code: 'test-div',
mediaTypes: {
banner: {
sizes: [[300, 250], [300, 600], [728, 90]]
}
},
bids: [
{
bidder: 'appnexus',
params: {
placementId: 234234,
}
}
]
}
];
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
</script>
<script async src="https://cdn.rvlproxy.net/latest/zkad.js"></script>
<script async src="../../build/dev/prebid.js"></script>
<script>
function getHashedEmail() { }
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function () {
googletag.pubads().disableInitialLoad();
});
pbjs.que.push(function () {
pbjs.setConfig({
"debug": true,
"realTimeData": {
dataProviders: [{
name: 'raveltech',
params: {
bidders: ['appnexus'],
// Set to true if you want to keep the original bid request along with the RTD‐modified one.
preserveOriginalBid: false
}
}]
},
// *************************************************************************
// ** COMMENT consentManagement BLOCK IF YOU DO NOT WANT TO SIMULATE GDPR **
// *************************************************************************
"consentManagement": {
"cmpApi": "static",
"consentData": {
"getTCData": {
"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",
"cmpId": 10,
"cmpVersion": 23,
"tcfPolicyVersion": 2,
"gdprApplies": true,
"cmpStatus": "loaded",
"eventStatus": "tcloaded",
"purpose": {
"consents": {
"1": true,
"2": true
}
},
"vendor": {
"consents": {
// add your GVL ID here and set to true to give consent within pbjs
"52": true, // rubicon for adserving
"21": true, // unifiedId
"131": true, // id5Id
"929": true, // parrableId
"97": true, // identityLink
"887": true, // uid2
"95": true, // lotamePanoramaId
"301": true, // zeotapIdPlus
"91": true, // criteo
"737": true, // amxId
"58": true, // 33acrossId
"32": true, // Appnexus (as well as for raveltech)
}
}
}
}
},
"userSync": {
"userIds": [
{
"name": "pubProvidedId",
"params": {
"eids": [
{
"source": "adnxs.com",
"uids": [
{
"id": "123456",
"atype": 1,
"ext": {
"stype": "ppuid" // allowable options are sha256email, DMP, ppuid for now
}
}
]
},
{
"source": "weborama_fr",
"uids": [
{
"id": "654321",
"atype": 1,
"ext": {
"stype": "ppuid" // allowable options are sha256email, DMP, ppuid for now
}
}
]
},
],
"eidsFunction": getHashedEmail // any user defined function that exists in the page
}
},
{
"name": "unifiedId",
"params": {
"partner": "prebid",
"url": "http://match.adsrvr.org/track/rid?ttd_pid=prebid&fmt=json"
},
"storage": {
"type": "html5",
"name": "unifiedid",
"expires": 30
}
},
{
"name": "33acrossId",
"params": {
"pid": '0'
},
"storage": {
"type": 'html5',
"name": '33acrossId',
"expires": 90
}
},
{
"name": "intentIqId",
"params": {
"partner": 0 // Set your real IntentIQ partner ID here for production.
},
"storage": {
"type": "cookie",
"name": "intentIqId",
"expires": 30
}
},
{
"name": "id5Id",
"params": {
"partner": 173 // Set your real ID5 partner ID here for production, please ask for one at http://id5.io/prebid
},
"storage": {
"type": "html5",
"name": "id5id",
"expires": 90,
"refreshInSeconds": 10// 8*3600 // Refresh frequency of cookies
}
},
{
"name": "merkleId",
"params": {
"endpoint": "https://test_endpoint/",
"vendor": "sdfg",
"sv_cid": "dfg",
"sv_pubid": "xcv",
"sv_domain": "zxv"
},
"storage": {
"type": "html5",
"name": "merkleId",
"expires": 30
}
},
{
"name": "parrableId",
"params": {
// change to Parrable Partner Client ID(s) you received from the Parrable Partners you are using
"partner": "30182847-e426-4ff9-b2b5-9ca1324ea09b"
}
},
{
"name": "pubCommonId",
"storage": {
"type": "cookie",
"name": "pubcid",
"expires": 365
}
// value: {
// foo: '9879878907987',
// bar:'93939'
// }
},
{
"name": "identityLink",
"params": {
"pid": "14" // Set your real identityLink placement ID here
// 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.
},
"storage": {
"type": "cookie",
"name": "idl_env",
"expires": 30
}
},
{
"name": "lotamePanoramaId"
},
{
"name": "liveIntentId",
"params": {
"publisherId": "9896876"
},
"storage": {
"type": "cookie",
"name": "_li_pbid",
"expires": 28
}
},
{
"name": "zeotapIdPlus"
},
{
"name": "hadronId",
"storage": {
"type": "cookie",
"name": "hadronId",
"expires": 28
}
},
{
"name": "criteo"
},
{
"name": "amxId",
"storage": {
"type": "html5",
"name": "amxId",
"expires": 14
}
},
{
"name": "uid2",
"params": {
"uid2Token": {
"advertising_token": "example token",
"refresh_token": "aslkdjaslkjdaslkhj",
"identity_expires": Date.now() + 60*1000,
"refresh_from": Date.now() - 10*1000,
"refresh_expires": Date.now() + 12*60*60*1000,
"refresh_response_key": null
}
}
},
{
"name": "euid",
"params": {
"euidApiBase": "https://integ.euid.eu", // Omit this setting for production
"euidToken": {
"advertising_token": "advertising token goes here",
"refresh_token": "refresh token goes here",
"identity_expires": Date.now() + 60*1000, // These timestamps should be from the token generate response
"refresh_from": Date.now() - 10*1000,
"refresh_expires": Date.now() + 12*60*60*1000,
"refresh_response_key": "refresh key goes here"
}
}
},
{
"name": "imuid",
"params": {
"cid": 5126 // Set your Intimate Merger Customer ID here for production
}
},
{
"name": "dacId"
},
{
"name": "gravitompId"
}
],
"syncDelay": 5000,
"auctionDelay": 1000
}
});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest
});
});
function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
googletag.cmd.push(function () {
if (pbjs.libLoaded) {
pbjs.que.push(function () {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
} else {
googletag.pubads().refresh();
}
});
}
setTimeout(function () {
sendAdserverRequest();
}, FAILSAFE_TIMEOUT);
</script>
<script>
(function () {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
gads.src = 'https://securepubads.g.doubleclick.net/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>
<script>
googletag.cmd.push(function () {
googletag.defineSlot('/112115922/FL_PB_MedRect', [[300, 250], [300, 600], [728, 90]], 'test-div').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>
<body>
<h2>User ID Modules Example</h2>
<h4>Generated EIDs</h4>
<script>
pbjs.que.push(function () {
var idsDiv = document.getElementById('ids-div');
idsDiv.innerHTML = JSON.stringify(pbjs.getUserIdsAsEids(), null, ' ');
});
</script>
<pre id="ids-div" style="border:1px solid #333; padding:5px; overflow: scroll"></pre>
<h4>Ad Slot</h4>
<div id="test-div" style="border:1px solid #333; padding:5px;">
<script>
googletag.cmd.push(function () { googletag.display('test-div'); });
</script>
</div>
</body>
</html>