-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit * Update * Update js * Update file name * Making it work (at least getting a response) * Update native logic * Updates to bidder * Update prebidder * Remove debugs * Updates * Add new templates * Update templates * Update email address * Resolve conflict * Resolve conflict * Rebase from master * Rebase from master * Add Revcontent Adapter * Force https, update supportedMediaTypes and add default return for extractHostname method * Add test file + remove console.log statement
- Loading branch information
1 parent
644e54b
commit 8c42f02
Showing
5 changed files
with
796 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.