Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eng 3578 #89

Merged
merged 131 commits into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
81d8f36
increment pre version
jsnellbaker Dec 11, 2019
2cd8607
Prebid 3.0 (#4580)
jsnellbaker Dec 11, 2019
ef63661
Prebid 3.0.0 Release
jsnellbaker Dec 11, 2019
8019d82
increment pre version
jsnellbaker Dec 11, 2019
aabb91f
added new param to sonobi adapter: keywords (#4549)
JonGoSonobi Dec 12, 2019
b615862
added TPMN Bidder Adapter (#4547)
tpmn-admin Dec 12, 2019
dcb4d6b
Onevideo supporting both CCPA and GDPR present case (#4571)
DeepthiNeeladri Dec 14, 2019
4fada4b
Criteo decrease bid adapter size (#4518)
leonardlabat Dec 16, 2019
78a05c5
Support for CCPA consent in Criteo adapter (#4604)
afewcc Dec 16, 2019
0a191b0
Feat/rtbsolutions (#4556)
rtbsolutions Dec 16, 2019
9ee797f
update several tests to let them work in ie11 (#4594)
jsnellbaker Dec 16, 2019
47a47aa
some minor test fixes (#4611)
jsnellbaker Dec 16, 2019
a01e1bd
Medianet: CCPA support added (#4573)
vedantseta Dec 16, 2019
1a5c9c1
Yieldmo prebid3.0 compliance, gdpr upadtes. remove openxoutstream bid…
HolzAndrew Dec 17, 2019
df9937b
Add CCPA support to Undertone adapter (#4576)
omerko Dec 17, 2019
562df99
small edits to fix undertone tests (#4616)
jsnellbaker Dec 17, 2019
ccf8be8
PubMatic: sending transactionId in source.tid (#4588)
pm-harshad-mane Dec 17, 2019
64a502e
Introduce Dailyhunt Bid Adapter (#4517)
montu1996 Dec 17, 2019
8f4836c
AstraOne: Fixed example in the documentation (#4590)
astraone-ssp Dec 17, 2019
f765d65
added CCPA support to sonobi bidder adapter (#4617)
JonGoSonobi Dec 17, 2019
909775b
Fixes for Prebid 3.0 (#4587)
bjorn-lw Dec 18, 2019
ae350b1
Re-Add Readpeak adapter (#4593)
kurrestahlberg Dec 18, 2019
8ed6ab9
Trion bid adapter re-submit to comply with v3 (#4609)
grohm33 Dec 18, 2019
df69f08
Sovrn ccpa support (#4592)
aprakash-sovrn Dec 18, 2019
aff2bd4
fix a bug when the iframe locator is not present on page (#4621)
mkendall07 Dec 18, 2019
b878aa9
Added US Privacy support for TheMediaGrid Bid Adapter (#4606)
TheMediaGrid Dec 18, 2019
b051c0b
Districtm DMX adapter support for CCPA (#4560)
stevealliance Dec 18, 2019
aa6daf4
TripleLift: CCPA support (#4628)
davidwoodsandersen Dec 18, 2019
82a9844
Consumable Bid Adapter: Add CCPA support (#4618)
jgrimes Dec 18, 2019
aa63645
Rubicon Analytics Adapter: convert to 3.0 (#4625)
msm0504 Dec 18, 2019
7682dd5
sovrn analytics adapter with 3.0 updates (#4620)
aprakash-sovrn Dec 18, 2019
9d6d322
Gamoshi: Fix adaptor code to comply for Prebid.js v3.0 (#4601)
Dec 18, 2019
ad6719a
Fidelity Media Bid Adapter. Prebid.js v3 support, CCPA support. (#4630)
onaydenov Dec 18, 2019
0d621e9
re-submit bid adapter for AdUp Technology (#4603)
SteffenAnders Dec 18, 2019
1d1d213
EMX Digital 3.0 Compliance (#4624)
EMXDigital Dec 18, 2019
c0d8dbf
remove unneeded console.log statement (#4639)
jsnellbaker Dec 18, 2019
fe7fdf5
pbsBidAdapter: register response currency (#4638)
bretg Dec 18, 2019
6b9b230
OpenX adpater: adding CCPA support (#4584)
jimee02 Dec 18, 2019
4c9bf6f
Update Sharethrough bid adapter endpoint (#4578)
madma Dec 18, 2019
bb7ecad
Prebid 3 adbutler (#4612)
dharton Dec 18, 2019
f353547
Prebid 3.1.0 Release
jsnellbaker Dec 18, 2019
927d36e
increment pre version
jsnellbaker Dec 18, 2019
271d634
Somo prebid 3.0 updates (#4595)
Dec 19, 2019
c8baee1
CleanMediaNet: Update adaptor code to meet Prebid.js v3.0 constraints…
Dec 19, 2019
5de6fa3
remove deprecated utils from widespace adapter (#4649)
ahsun-ahmed Dec 19, 2019
c147d0d
NasmediaAdmixer Bid Adapter - v3.0 compliance (#4629)
NasmediaWebtech Dec 20, 2019
75d6afa
Index Exchange: CCPA support (#4655)
ix-prebid-support Dec 20, 2019
853b4e4
support for us privacy (CCPA) (#4651)
nwlosinski Dec 20, 2019
39a57ba
envivoBidAdapter - Request to add new bidder (#4545)
envivoBidder Dec 20, 2019
861e0bd
Add Teads US Privacy (#4658)
Dec 20, 2019
141118e
update/fix cases of undefined variables (#4661)
jsnellbaker Dec 20, 2019
c842c0c
Prebid 3.1.1 Release
jsnellbaker Dec 20, 2019
4b80ae3
increment pre version
jsnellbaker Dec 20, 2019
34227c8
Change publisherId to zoneId (#4619)
vladi-mmg Dec 20, 2019
b923038
Fix DSPX adapter for PrebidJs 3.0 (#4597)
onlsol Dec 21, 2019
521c0f9
Reinstate Playground XYZ adapter with v3 support (#4585)
monofonik Dec 23, 2019
88b6a6d
aniview V3 & CCPA support (#4583)
itaynave Dec 24, 2019
c81ea5c
PR review process: add doc cases (#4653)
bretg Dec 30, 2019
8386a33
CCX adapter: Attaching GDPR Consent Params (#4524)
mjaworskiccx Dec 31, 2019
0b98025
Advertly: New Bidder Adapter Submission (#4496)
Advertly Jan 2, 2020
f657ec5
Pass uspConsent in bidRequest (#4675)
Jacobkmiller Jan 2, 2020
34416c4
Prebid 3 Admixer (#4615)
AdmixerTech Jan 2, 2020
773a004
pass us privacy consent string to request (#4581)
susyt Jan 2, 2020
598ceb5
Added CCPA support and GDPR compliance to Cedato adapter (#4683)
alexkh13 Jan 3, 2020
9859692
Bidder schain support (#4551)
jsnellbaker Jan 3, 2020
3821e0f
Add eplanning adapter for prebid 3.0 compliant and CCPA and GDPR supp…
sebaperez Jan 3, 2020
ba510d6
Changed analytics data structure in YuktaMedia Analytic Adapter (#4659)
shrikantpatwari Jan 3, 2020
c5460d9
add seedingAlliance Adapter (#4614)
Jan 3, 2020
28c6dc5
Add CCPA support to Beachfront adapter (#4673)
jsalis Jan 3, 2020
c015d79
freewheelSSPBidAdapter (#4645)
xwang202 Jan 3, 2020
41a8350
ucfunnel adapter support CCPA and remove utils.js in adapter (#4541)
Jan 6, 2020
9fb91c7
Add CCPA us_privacy support to spotxBidAdapter (#4689)
npeceniak Jan 7, 2020
cb3a856
replace all xhr stubs with global xhr stub to prevent all requests (#…
snapwich Jan 7, 2020
4391d6c
Add static API option to the consentManagementUsp module. (#4685)
dbirkbeck Jan 7, 2020
9bd43a5
Prebid 3.2.0 Release
jsnellbaker Jan 7, 2020
8d4724b
increment pre version
jsnellbaker Jan 7, 2020
644e54b
Changed data structure in Platform One Analytic Adapter (#4647)
hbanalytics Jan 7, 2020
8c42f02
Add Revcontent Adapter (#4654)
AzizSaleh Jan 8, 2020
3049200
fix lint errors in unit test file (#4702)
jsnellbaker Jan 8, 2020
419fde3
Aardvark: schain support (#4636)
FilipStamenkovic Jan 8, 2020
6585dbe
upgrade gammassp to version 3.0 (#4668)
gammassp Jan 8, 2020
d14589b
ozone 2.2.0 adapter updates (#4676)
afsheenb Jan 9, 2020
a3d2afc
add segmento bid adapter (#4660)
balabanova-segmento Jan 9, 2020
f7f79c3
New adfinity adapter (#4591)
adfinity-prebid Jan 9, 2020
a4d7191
FreeWheelAdapter-CCPA support CCPA consent in freeWheelSSPAdapter (#4…
xwang202 Jan 9, 2020
84d44df
Fix data transmission issues on AdYouLike bid adapter (#4296)
guiann Jan 9, 2020
f34728b
Innity Bid Adapter: Support for Prebid.js v3 (#4633)
engtat Jan 9, 2020
f76942a
Gamoshi: Add support for CCPA and SChain (#4672)
Jan 9, 2020
e365a48
Added support for CCPA (#4684)
redaguermas Jan 9, 2020
60a3317
Adagio bid adapter 2.1.0 (#4704)
osazos Jan 9, 2020
eeedc2c
Fixed two typos USP was mentioned as UPS (#4711)
pm-harshad-mane Jan 10, 2020
86ca593
Criteo adapter should reactivate limited native support (#4697)
bmwcmw Jan 13, 2020
2729df9
pbsBidAdapter: default to HTTPS (#4726)
bretg Jan 13, 2020
ae820af
lkqdBidAdapter (#4627)
mrcrawfo Jan 13, 2020
9eaf6e5
AdagioBidAdapter: cast organizationId param as a string (#4721)
osazos Jan 14, 2020
9a8ee2b
adding support for ccpa/iab usp (#4722)
samuelhorwitz Jan 14, 2020
ca5b997
ucfunnel adapter native ad support clicktrackers (#4713)
Jan 14, 2020
4ae5eef
AdkernelAdn analytics 3.0 compatible (#4707)
ckbo3hrk Jan 14, 2020
5f9d7c0
Between: GDPR support added (#4680)
ignat-one Jan 14, 2020
09ccc13
Add videoCacheKey to bid. (#4706)
vseventer Jan 14, 2020
641b218
[Sharethrough] Support for CCPA/IAB US Privacy (#4723)
epechuzal Jan 14, 2020
0ee2046
GDPR and unique request (#4688)
vincentproxistore Jan 14, 2020
9c92c16
Add fluct Adapter (#4657)
shu22203 Jan 14, 2020
fa13966
Pre-auction filters and pbAdslot support (#4539)
Jan 15, 2020
99da41f
if seatBidId is on bidResponse, always use it (#4732)
robertrmartinez Jan 15, 2020
1622e24
AdYouLike bidder adapter support us privacy (#4708)
guiann Jan 15, 2020
d40ca16
Sync pixel change onevideo adaptor (#4718)
DeepthiNeeladri Jan 15, 2020
4140cda
update urls not using https (#4738)
jsnellbaker Jan 15, 2020
dcb2116
Prebid 3.3.0 Release
bretg Jan 15, 2020
3468cf7
increment pre-version
bretg Jan 15, 2020
246b177
Sonobi - removed unneeded query params (#4735)
JonGoSonobi Jan 16, 2020
15204c5
Sync pixel redirect fix and Test cases (#4741)
DeepthiNeeladri Jan 16, 2020
e6289ec
Add adtarget gamoshi alias (#4743)
Jan 16, 2020
db0dc47
ucfunnel adapter change cookie sync setting (#4750)
Jan 17, 2020
f4475f4
IE fix: calling matchMedia with an empty string (#4691)
benjaminclot Jan 20, 2020
1b591f2
Updating smartadserver adapter for prebid v3 compatibility. (#4714)
tadam75 Jan 21, 2020
d67768b
fix(usersync): corrected usersync url (#4712)
sourabhg Jan 21, 2020
1373313
Trion gdpr and usp consent (#4740)
grohm33 Jan 21, 2020
66da761
Added customSlotMatching test for setTargetingForGPTAsync (#4709)
ptomasroos Jan 22, 2020
0a278a4
YIELDONE adapter - update for prebid v3 (#4749)
kusapan Jan 22, 2020
aed63a8
Media.net : updates documentation (#4763)
vedantseta Jan 22, 2020
e9b50f2
Cedato - fix user sync url (#4764)
alexkh13 Jan 22, 2020
39615f7
#4674 Addition of DigiTrust vendor check for gdpr when cmp is present…
goosemanjack Jan 22, 2020
fd0a001
Update to v3 (#4762)
VideoReach Jan 23, 2020
091db5f
Support Native (#4759)
bjorn-lw Jan 23, 2020
c760ca5
Updating the audience network adapter to be 3.x compliant (#4769)
robertrmartinez Jan 23, 2020
5a1863e
Adtelligent bid adapter updated to v3.0 (#4703)
GeneGenie Jan 23, 2020
4bca612
GumGum: passes bid response's currency unit (#4757)
susyt Jan 23, 2020
e4f8fbc
Prebid 3.4.0 Release
Jan 23, 2020
907855f
Merge tag '3.4.0' into ENG-3578
aecook Jan 28, 2020
8ca51b6
Updated to 3.4.0
aecook Jan 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = {
"eqeqeq": "off",
"no-return-assign": "off",
"no-throw-literal": "off",
"no-undef": "off",
"no-undef": 2,
"no-useless-escape": "off",
},
"overrides": Object.keys(allowedModules).map((key) => ({
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ When you are adding code to Prebid.js, or modifying code that isn't covered by a
- _Assert_: check that the expected results have occurred
- e.g., use Chai assertions to check that the expected output is equal to the actual output
- Test the public interface, not the internal implementation
- If you need to check `adloader.loadScript` in a test, use a `stub` rather than a `spy`. `spy`s trigger a network call which can result in a `script error` and cause unrelated unit tests to fail. `stub`s will let you gather information about the `adloader.loadScript` call without affecting external resources
- If you need to check `adloader.loadExternalScript` in a test, use a `stub` rather than a `spy`. `spy`s trigger a network call which can result in a `script error` and cause unrelated unit tests to fail. `stub`s will let you gather information about the `adloader.loadExternalScript` call without affecting external resources
- If your test makes ajax requests, use the global xhr stub in `test/mocks/xhr`. Do not use your own `sinon.useFakeXMLHttpRequest()` or `sinon.createFakeServer()`.
- When writing tests you may use ES2015 syntax if desired

### Test Examples
Expand Down
4 changes: 3 additions & 1 deletion PR_REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ For modules and core platform updates, the initial reviewer should request an ad
- If the change results in needing updates to docs (such as public API change, module interface etc), add a label for "needs docs" and inform the submitter they must submit a docs PR to update the appropriate area of Prebid.org **before the PR can merge**. Help them with finding where the docs are located on prebid.org if needed.
- Below are some examples of bidder specific updates that should require docs update (in their dev-docs/bidders/bidder.md file):
- Add support for GDPR consentManagement module > add `gdpr_supported: true`
- Add support for US Privacy consentManagement module > add `usp_supported: true`
- Add support for userId module > add `userId: pubCommon, digitrust, newProviderHere`
- Add support for video and/or native mediaTypes > add `media_types: video, native`
- Add support for COPPA > add `coppa_supported: true`
- Add support for SChain > add `schain_supported: true`
- If all above is good, add a `LGTM` comment and request 1 additional core member to review.
- Once there is 2 `LGTM` on the PR, merge to master
- Ask the submitter to add a PR for documentation if applicable.
Expand All @@ -29,7 +31,7 @@ For modules and core platform updates, the initial reviewer should request an ad
- Follow steps above for general review process. In addition, please verify the following:
- Verify that bidder has submitted valid bid params and that bids are being received.
- Verify that bidder is not manipulating the prebid.js auction in any way or doing things that go against the principles of the project. If unsure check with the Tech Lead.
- Verify that the bidder is being as efficient as possible, ideally not loading an external library, however if they do load a library it should be cached.
- Verify that the bidder is being as efficient as possible, ideally not loading an external library, however if they do load a library it should be cached.
- Verify that code re-use is being done properly and that changes introduced by a bidder don't impact other bidders.
- If the adapter being submitted is an alias type, check with the bidder contact that is being aliased to make sure it's allowed.
- If the adapter is triggering any user syncs make sure they are using the user sync module in the Prebid.js core.
Expand Down
1 change: 1 addition & 0 deletions allowedModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const sharedWhiteList = [
module.exports = {
'modules': [
...sharedWhiteList,
'criteo-direct-rsa-validate',
'jsencrypt',
'crypto-js'
],
Expand Down
25 changes: 25 additions & 0 deletions integrationExamples/gpt/cmp_files/purposes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 1,
"purposes": [
{
"id": 25,
"name": "Custom Purpose 1",
"description": "Here's a description of the first purpose"
},
{
"id": 26,
"name": "Custom Purpose 2",
"description": "Here's a description of the second purpose"
},
{
"id": 27,
"name": "Custom Purpose 3",
"description": "Here's a description of the third purpose"
},
{
"id": 28,
"name": "Custom Purpose 4",
"description": "Here's a description of the fourth purpose"
}
]
}
1 change: 1 addition & 0 deletions integrationExamples/gpt/digitrust_Simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
{
code: 'test-div',
sizes: [[300, 250], [300, 600], [728, 90]],
mediaTypes: { banner: { sizes: [400, 600], name: 'testAdUnit'}},
bids: [
{
bidder: 'rubicon',
Expand Down
192 changes: 192 additions & 0 deletions integrationExamples/gpt/digitrust_cmp_test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
<html>
<head>
<title>CMP Simple DigiTrust Prebid - No Framework</title>
<script>
(function (window) {
window.__cmp = (function () {
window.addEventListener('message', function (event) {
window.__cmp.receiveMessage(event);
});

var commandQueue = [];
var cmp = function (command, parameter, callback) {
commandQueue.push({
command: command,
parameter: parameter,
callback: callback
});
};
cmp.commandQueue = commandQueue;
cmp.receiveMessage = function (event) {
var data = event && event.data && event.data.__cmpCall;
if (data) {
commandQueue.push({
callId: data.callId,
command: data.command,
parameter: data.parameter,
event: event
});
}
};
cmp.config = {
customPurposeListLocation: './cmp_files/purposes.json',
globalVendorListLocation: 'https://vendorlist.consensu.org/vendorlist.json',
globalConsentLocation: 'http://cmp-origin-release.digitru.st/1/docs/portal.html',
storeConsentGlobally: false,
storePublisherConsentGlobally: false,
storePublisherData: true,
layout: 'footer',
logging: "debug",
blockBrowsing: false,
forceLocale: 'en',
testingMode: 'always show',
showFooterAfterSubmit: true,
};
return cmp;
}());
})(window);

window.__cmp('renderCmpIfNeeded');
</script>

<script>
var FAILSAFE_TIMEOUT = 2000;

var adUnits = [
{
code: 'test-div',
sizes: [[300, 250], [300, 600], [728, 90]],
mediaTypes: { banner: { sizes: [400, 600], name: 'testAdUnit' } },
bids: [
{
bidder: 'rubicon',
params: {
accountId: '1001',
siteId: '113932',
zoneId: '535510'
}
}
]
}
];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
</script>
<script src="../../build/dev/prebid.js" async></script>

<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function () {
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function () {
pbjs.setConfig({
debug: true,
consentManagement: {
cmpApi: 'iab',
timeout: 1000,
allowAuctionWithoutConsent: true
},
usersync: {
userIds: [{
name: "digitrust",
params: {
init: {
member: 'example_member_id',
site: 'example_site_id'
},
callback: function (digiTrustResult) {
// This callback can be used by publisher page to react to error conditions
// Or pass the DigiTrust ID on.
// If the Prebid userId system already has a managed copy of the DigiTrust ID
// this callback will not be invoked.
var elem = document.getElementById('idDiv');
var msg;
if (digiTrustResult.success) {
console.log('Success in Digitrust init');
if (digiTrustResult.identity && digiTrustResult.identity.id != null) {
msg = 'DigiTrust Id (encrypted): ' + digiTrustResult.identity.id;
elem.innerHTML = msg;
console.log(msg);
}
else {
console.error('Digitrust gave success, but no identity returned');
}
}
else {
console.error('Digitrust init failed');
}
}
},
storage: {
type: "html5",
name: "pbjsdigitrust",
expires: 60
}
}]
}
});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest
});
});

function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
googletag.cmd.push(function () {
pbjs.que.push(function () {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}

setTimeout(function () {
sendAdserverRequest();
}, FAILSAFE_TIMEOUT);
</script>

<script>
(function () {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/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]], 'test-div').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>

<body>
<h2>DigiTrust Prebid Sample - No Framework</h2>

<p>
This sample tests cmp behavior with simple integration path for using DigiTrust ID with Prebid.
You can use DigiTrust ID without integrating the entire DigiTrust suite.
</p>
<div id="idDiv"></div>

<div id='test-div'>
<script>
googletag.cmd.push(function () { googletag.display('test-div'); });
</script>
</div>
<script src="http://cmp-origin-release.digitru.st/1/cmp.bundle.js"></script>
</body>
</html>
Empty file modified integrationExamples/gpt/hello_world.html
100644 → 100755
Empty file.
6 changes: 5 additions & 1 deletion integrationExamples/gpt/prebidServer_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
pbjs.que.push(function() {
var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
sizes: [[300, 250]],
mediaTypes: {
banner: {
sizes: [[300, 250]]
}
},
bids: [
{
bidder: 'appnexus',
Expand Down
109 changes: 109 additions & 0 deletions integrationExamples/gpt/revcontent_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<html>

<head>
<link rel="icon" type="image/png" href="/favicon.png">
<script async src="//www.googletagservices.com/tag/js/gpt.js"></script>
<script async src="../../build/dev/prebid.js"></script>
<script>
/*
Supported sizes:
----------------
300x250 - Medium rectangle
728x90 - Leaderboard
300x600 - Half page or large skyscraper
*/
var size = {width: 300, height: 250};

var PREBID_TIMEOUT = 10000;
var FAILSAFE_TIMEOUT = 30000;

var adUnits = [{
code: '/19968336/header-bid-tag-1',
mediaTypes: {
native: {
image: {
required: false
},
title: {
required: false,
len: 140
},
clickUrl: {
required: false
},
sponsoredBy: {
id: 5,
name: 'data',
type: 1
}
}
},
bids: [{
bidder: 'revcontent',
params: {
size: size,
apiKey: '8a33fa9cf220ae685dcc3544f847cdda858d3b1c',
userId: 673,
domain: 'test.com',
endpoint: 'trends-s0.revcontent.com'
}
}]
}];

// ======== DO NOT EDIT BELOW THIS LINE =========== //
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: initAdserver,
timeout: PREBID_TIMEOUT
});
});

function initAdserver() {
if (pbjs.initAdserverSet) return;
pbjs.initAdserverSet = true;
googletag.cmd.push(function() {
pbjs.setTargetingForGPTAsync && pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
}

// in case PBJS doesn't load
setTimeout(function() {
initAdserver();
}, FAILSAFE_TIMEOUT);

googletag.cmd.push(function() {
googletag.defineSlot('/19968336/header-bid-tag-1', [[size.width, size.height]], 'div-1')
.addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});

</script>

</head>

<body>
<h2>Basic Prebid.js Example</h2>
<h5>Div-1</h5>
<div id='div-1'>
<script type='text/javascript'>
googletag.cmd.push(function() {
googletag.display('div-1');
});

</script>
</div>
</body>

</html>
Loading