forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
basic_w_priceGran.html
156 lines (147 loc) · 5.34 KB
/
basic_w_priceGran.html
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
<!Doctype html>
<html>
<head>
<title>Prebid Freewheel Integration Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- <script async src="//acdn.adnxs.com/prebid/not-for-prod/1/prebid.js"></script> -->
<script src="longformTestUtils.js"></script>
<script>
prebidTestUtils.setMockCategories();
</script>
<script src="/build/dist/prebid.js" async=true></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" />
<!-- <script type="text/javascript" src="//adm.fwmrm.net/p/vitest-js/AdManager.js"></script> -->
<!-- <script type="text/javascript" src="https://mssl.fwmrm.net/libs/adm/6.24.0/AdManager-debug.js"></script> -->
<!-- <script type="text/javascript" src="player.js"></script> -->
<link rel="stylesheet" href="longform_testpages_style.css">
<script>
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var videoAdUnit = [{
code: 'sample-code',
sizes: [640, 480],
mediaTypes: {
video: {
context: 'adpod',
playerSize: [640, 480],
adPodDurationSec: 300,
durationRangeSec: [15, 30],
requireExactDuration: false
}
},
bids: [
{
bidder: 'appnexus',
params: {
placementId: 15394006
}
}
]
}];
const customConfigObject = {
'buckets': [{
'precision': 2, // default is 2 if omitted - means 2.1234 rounded to 2 decimal places = 2.12
'min': 0,
'max': 5,
'increment': 0.01 // from $0 to $5, 1-cent increments
},
{
'precision': 2,
'min': 5,
'max': 8,
'increment': 0.05 // from $5 to $8, round down to the previous 5-cent increment
},
{
'precision': 2,
'min': 8,
'max': 40,
'increment': 0.5 // from $8 to $40, round down to the previous 50-cent increment
}]
};
pbjs.que.push(function () {
pbjs.addAdUnits(videoAdUnit);
pbjs.setConfig({
debug: true,
cache: {
url: 'https://prebid.adnxs.com/pbc/v1/cache'
},
adpod: {
brandCategoryExclusion: true
},
priceGranularity: customConfigObject
});
});
function loadPrebidRequest() {
pbjs.que.push(function () {
pbjs.requestBids({
bidsBackHandler: function (bids) {
pbjs.adServers.freewheel.getTargeting({
callback: function (err, targeting) {
prebidTestUtils.loadKv(targeting);
prebidTestUtils.loadBids(targeting, true);
console.log(targeting);
}
});
}
});
});
}
</script>
</head>
<body>
<h1 style="margin:20px">Prebid Freewheel Test Page</h1>
<h2 style="margin:20px">requireExactDuration = false</h2>
<div class="row" style="margin: 20px">
<div class="col-lg-6">
<button id="loadPrebidRequestBtn" class="btn btn-secondary" type="button" onclick="loadPrebidRequest()">Load
Prebid</button>
<div class="row">
<div class="accordion" id="accordionExample">
<div class="card">
<div class="card-header" id="headingTwo">
<h2 class="mb-0">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseTwo"
aria-expanded="false" aria-controls="collapseTwo">
Bids Sent to Freewheel
</button>
</h2>
</div>
<div id="collapseTwo" class="collapse show" aria-labelledby="headingTwo">
<div class="card-body">
// bids
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingThree">
<h2 class="mb-0">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseThree"
aria-expanded="false" aria-controls="collapseThree">
Key Value Pairs Sent to Freewheel
</button>
</h2>
</div>
<div id="collapseThree" class="collapse show" aria-labelledby="headingThree">
<div class="card-body">
// bids
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>