Skip to content

Commit 568a90d

Browse files
Revcontent Bid Adapter: adjusted for Price Floors Module (prebid#7093)
* Original adapter * REVC-3691 | Prebid.js support for price floors module (#1) * REVC-3691 | Prebid.js support for price floors module | Call getFloor function; test-case is added * REVC-3691 | 1 - Snippet with multi-items (#2) * REVC-3691 | Prebid.js support for price floors module | Snippet for multi-item * REVC-3691 | Prebid.js support for price floors module | Muti-item + fixed test-cases (#3) * REVC-3691 | Prebid.js support for price floors module | Fixed demo pages * REVC-3691 | Prebid.js support for price floors module | Added demo with multi-items * manually kick off circleci tests Co-authored-by: Chris Huie <[email protected]>
1 parent 26aa81b commit 568a90d

File tree

4 files changed

+790
-7
lines changed

4 files changed

+790
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Prebid.js Banner Example</title>
6+
<!-- Prebid.js -->
7+
<!-- <script async src="prebid.js"></script> -->
8+
<!-- <script async src="../../build/dist/prebid.js"></script> -->
9+
<script async src="../../build/dev/prebid.js"></script>
10+
<!-- Google Publisher Tag -->
11+
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
12+
<script>
13+
var pbjs = pbjs || {};
14+
pbjs.que = pbjs.que || [];
15+
const customConfigObject = {
16+
"buckets": [{
17+
"max": 40,
18+
"increment": 0.5
19+
}]
20+
};
21+
// Prebid Banner Ad Unit
22+
const adUnits = [{
23+
code: '/21623266709/prebid-test',
24+
mediaTypes: {
25+
banner: {
26+
sizes: [[300, 250]],
27+
}
28+
},
29+
bids: [{
30+
bidder: 'revcontent',
31+
params: {
32+
// Your user-id and api-key
33+
apiKey: 'abababababababababababababababababababab',
34+
userId: 111111,
35+
domain: 'www.denverpost.com',
36+
endpoint: 'trends.revcontent.com',
37+
bidfloor: 0.05,
38+
}
39+
}]
40+
},{
41+
code: '/21623266709/prebid-test-2',
42+
mediaTypes: {
43+
banner: {
44+
sizes: [[300, 250]],
45+
}
46+
},
47+
bids: [{
48+
bidder: 'revcontent',
49+
params: {
50+
// Your user-id and api-key
51+
apiKey: 'abababababababababababababababababababab',
52+
userId: 111111,
53+
domain: 'www.denverpost.com',
54+
endpoint: 'trends.revcontent.com',
55+
bidfloor: 0.05,
56+
}
57+
}]
58+
}
59+
];
60+
</script>
61+
<script>
62+
var googletag = googletag || {};
63+
googletag.cmd = googletag.cmd || [];
64+
googletag.cmd.push(function () {
65+
googletag.pubads().disableInitialLoad();
66+
});
67+
pbjs.que.push(function () {
68+
pbjs.setConfig({
69+
enableSendAllBids: false,
70+
priceGranularity: customConfigObject
71+
});
72+
pbjs.addAdUnits(adUnits);
73+
pbjs.requestBids({ bidsBackHandler: sendAdServerRequest });
74+
});
75+
function sendAdServerRequest() {
76+
googletag.cmd.push(function () {
77+
pbjs.que.push(function () {
78+
pbjs.setTargetingForGPTAsync('/21623266709/prebid-test');
79+
pbjs.setTargetingForGPTAsync('/21623266709/prebid-test-2');
80+
googletag.pubads().refresh();
81+
});
82+
});
83+
}
84+
</script>
85+
<script>
86+
googletag.cmd.push(function () {
87+
googletag
88+
.defineSlot('/21623266709/prebid-test', [[300, 250]], 'div-0')
89+
.addService(googletag.pubads());
90+
googletag
91+
.defineSlot('/21623266709/prebid-test-2', [[300, 250]], 'div-1')
92+
.addService(googletag.pubads());
93+
googletag.pubads().enableSingleRequest();
94+
googletag.enableServices();
95+
});
96+
</script>
97+
</head>
98+
<body>
99+
<h2>Prebid.js Banner Example</h2>
100+
<div id='div-0'>
101+
<script>
102+
googletag.cmd.push(function () {
103+
googletag.display('div-0');
104+
});
105+
</script>
106+
</div>
107+
<br>
108+
<div id='div-1'>
109+
<script>
110+
googletag.cmd.push(function () {
111+
googletag.display('div-1');
112+
});
113+
</script>
114+
</div>
115+
<div id="targeting-keys"></div>
116+
</body>

integrationExamples/gpt/revcontent_example.html renamed to integrationExamples/gpt/revcontent_example_native.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<html>
2-
32
<head>
4-
<link rel="icon" type="image/png" href="/favicon.png">
5-
<script async src="//www.googletagservices.com/tag/js/gpt.js"></script>
3+
<title>Prebid.js Native Example</title>
4+
65
<script async src="../../build/dev/prebid.js"></script>
6+
<script async src="//www.googletagservices.com/tag/js/gpt.js"></script>
77
<script>
88
/*
99
Supported sizes:
@@ -42,8 +42,9 @@
4242
bidder: 'revcontent',
4343
params: {
4444
size: size,
45-
apiKey: '8a33fa9cf220ae685dcc3544f847cdda858d3b1c',
46-
userId: 673,
45+
// Your user-id and api-key
46+
apiKey: 'abababababababababababababababababababab',
47+
userId: 111111,
4748
domain: 'test.com',
4849
endpoint: 'trends.revcontent.com'
4950
}
@@ -94,14 +95,13 @@
9495
</head>
9596

9697
<body>
97-
<h2>Basic Prebid.js Example</h2>
98+
<h2>Prebid.js Native Example</h2>
9899
<h5>Div-1</h5>
99100
<div id='div-1'>
100101
<script type='text/javascript'>
101102
googletag.cmd.push(function() {
102103
googletag.display('div-1');
103104
});
104-
105105
</script>
106106
</div>
107107
</body>

0 commit comments

Comments
 (0)