forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'prebid:master' into master
- Loading branch information
Showing
147 changed files
with
5,341 additions
and
2,116 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
164 changes: 164 additions & 0 deletions
164
integrationExamples/gpt/liveIntentRtdProviderExample.html
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,164 @@ | ||
<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> | ||
var div_1_sizes = [ | ||
[300, 250], | ||
[300, 600] | ||
]; | ||
var div_2_sizes = [ | ||
[728, 90], | ||
[970, 250] | ||
]; | ||
var PREBID_TIMEOUT = 1000; | ||
var FAILSAFE_TIMEOUT = 3000; | ||
var adUnits = [ | ||
{ | ||
code: '/19968336/header-bid-tag-0', | ||
mediaTypes: { | ||
banner: { | ||
sizes: div_1_sizes | ||
} | ||
}, | ||
bids: [{ | ||
bidder: 'appnexus', | ||
params: { | ||
siteId: 'examplePub123', // required | ||
productId: 'siab|inview' // required | ||
} | ||
}] | ||
}, | ||
{ | ||
code: '/19968336/header-bid-tag-1', | ||
mediaTypes: { | ||
banner: { | ||
sizes: div_2_sizes | ||
} | ||
}, | ||
bids: [{ | ||
bidder: 'appnexus', | ||
params: { | ||
siteId: 'examplePub123', // required | ||
productId: 'siab|inview' // required | ||
} | ||
}] | ||
} | ||
]; | ||
// ======== 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.setConfig({ | ||
debug: true, | ||
realTimeData: { | ||
dataProviders:[{ | ||
name: "liveintent", | ||
waitForIt: true | ||
}] | ||
}, | ||
"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 | ||
"148": true, // liveintent | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
userSync: { | ||
auctionDelay: 1000, | ||
userIds: [ | ||
{ | ||
"name": "liveIntentId", | ||
"params": { | ||
"liCollectConfig" : { | ||
"distributorId" : "did-0000" | ||
} | ||
}, | ||
"value" : { | ||
"lipbid": | ||
{ | ||
"segments": ["asa_1231", "lalo_4311", "liurl_99123"], | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}); | ||
pbjs.addAdUnits(adUnits); | ||
pbjs.requestBids({ | ||
bidsBackHandler: initAdserver, | ||
timeout: PREBID_TIMEOUT | ||
}); | ||
}); | ||
function initAdserver() { | ||
if (pbjs.initAdserverSet) return; | ||
pbjs.initAdserverSet = true; | ||
googletag.cmd.push(function() { | ||
pbjs.que.push(function() { | ||
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-0', div_1_sizes, 'div-1').addService(googletag.pubads()); | ||
googletag.pubads().enableSingleRequest(); | ||
googletag.enableServices(); | ||
}); | ||
googletag.cmd.push(function() { | ||
googletag.defineSlot('/19968336/header-bid-tag-1', div_2_sizes, 'div-2').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> | ||
<br> | ||
<h5>Div-2</h5> | ||
<div id='div-2'> | ||
<script type='text/javascript'> | ||
googletag.cmd.push(function() { | ||
googletag.display('div-2'); | ||
}); | ||
</script> | ||
</div> | ||
</body> | ||
</html> |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.