Skip to content

Commit

Permalink
Merge branch 'prebid:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Skitelman authored Aug 14, 2023
2 parents c4fdab6 + a4218f1 commit afde14d
Show file tree
Hide file tree
Showing 824 changed files with 47,875 additions and 34,407 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
},

"postCreateCommand": "bash .devcontainer/postCreate.sh",

// Make is-docker work again
"postStartCommand": "test -f /.dockerenv || sudo touch /.dockerenv",

// Set *default* container specific settings.json values on container create.
"settings": {},

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ "master" ]
branches: [ "master"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
branches: [ "master"]
schedule:
- cron: '22 11 * * 0'

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ pbjs.requestBids({

## Install



$ git clone https://github.com/prebid/Prebid.js.git
$ cd Prebid.js
$ npm ci
Expand Down Expand Up @@ -358,3 +360,4 @@ Prebid.js is supported on IE11 and modern browsers until 5.x. 6.x+ transpiles to

### Governance
Review our governance model [here](https://github.com/prebid/Prebid.js/tree/master/governance.md).
### END
1 change: 0 additions & 1 deletion integrationExamples/gpt/adUnitFloors.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,3 @@ <h5>Div-1</h5>
</body>

</html>

167 changes: 0 additions & 167 deletions integrationExamples/gpt/captifyRtdProvider_example.html

This file was deleted.

103 changes: 103 additions & 0 deletions integrationExamples/gpt/fledge_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<html>
<head>
<!--
FLEDGE (Protected Audience API) configuration with GPT and FLEDGE-supporting adapter
gulp serve --modules=fledgeForGpt,openxBidAdapter
-->
<script async src="../../build/dev/prebid.js"></script>
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script>
var FAILSAFE_TIMEOUT = 3000;
var PREBID_TIMEOUT = 1500;

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

var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];

googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
mediaTypes: {
banner: {
sizes: [[300, 250]]
}
},
bids: [{
bidder: 'openx',
params: {
platform: '8869ec2c-9d3f-4f16-9d2f-49aaab8978fb',
unit: '111111'
}
}],
ortb2Imp: {
ext: {
ae: 1
}
}
}];

pbjs.que.push(function() {
pbjs.setConfig({
fledgeForGpt: {
enabled: true
}
});

pbjs.setBidderConfig({
bidders: ['openx'],
config: {
fledgeEnabled: true
}
});

pbjs.addAdUnits(adUnits);

pbjs.requestBids({
bidsBackHandler: sendAdserverRequest,
timeout: PREBID_TIMEOUT
});

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);
});

googletag.cmd.push(function() {
googletag
.defineSlot('/19968336/header-bid-tag-0', adUnits[0].mediaTypes.banner.sizes, 'div-gpt-ad-1460505748561-0')
.addService(googletag.pubads());

googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>

<body>
<h2>Prebid.js FLEDGE+GPT Example</h2>

<h5>Div-1</h5>
<div id='div-gpt-ad-1460505748561-0'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1460505748561-0'); });
</script>
</div>
</body>
</html>
42 changes: 22 additions & 20 deletions integrationExamples/gpt/growthcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
<script async src="../../build/dev/prebid.js"></script>
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script>
var FAILSAFE_TIMEOUT = 3300;
var PREBID_TIMEOUT = 1000;
var FAILSAFE_TIMEOUT = 33000;
var PREBID_TIMEOUT = 10000;

var adUnits = [{
debugging: {
enabled: true
},
code: 'div-gpt-ad-1460505748561-0',
mediaTypes: {
banner: {
Expand All @@ -23,6 +26,11 @@
params: {
placementId: 13144370
}
},{
bidder: 'criteo',
params: {
zoneId: 497747
},
}],
}];

Expand All @@ -48,31 +56,25 @@
provider: 'growthCodeAnalytics',
options: {
pid: 'TEST01',
//url: 'http://localhost:8080/v3/pb/analytics',
trackEvents: [
'auctionInit',
'auctionEnd',
'bidAdjustment',
'bidTimeout',
'bidTimeout',
'bidRequested',
'bidResponse',
'setTargeting',
'requestBids',
'addAdUnits',
'noBid',
'bidWon',
'bidderDone']
]
}
});
pbjs.setConfig({
debugging: {
enabled: true,
bids: [{
bidder: 'appnexus',
adUnitCode: '/19968336/header-bid-tag-0',
cpm: 1.5,
adId: '111111',
ad: '<html><body><img src="https://files.prebid.org/creatives/prebid300x250.png"></body></html>'
},
realTimeData: {
auctionDelay: 1000,
dataProviders: [{
name: 'growthCodeRtd',
waitForIt: false,
params: {
pid: 'TEST01',
}
}]
},
userSync: {
Expand All @@ -81,7 +83,7 @@
storage: {
type: "html5",
name: "_sharedID", // create a cookie with this name
expires: 365 // expires in 1 years
expires: 365 // expires in 1 year
}
},{
name: 'growthCodeId',
Expand Down
Loading

0 comments on commit afde14d

Please sign in to comment.