Skip to content

Commit

Permalink
Merge branch 'master' of github.com:prebid/Prebid.js into prebid-master
Browse files Browse the repository at this point in the history
  • Loading branch information
pro-nsk committed Jul 12, 2023
2 parents 8a867e9 + ab56b25 commit b137e3d
Show file tree
Hide file tree
Showing 811 changed files with 55,953 additions and 37,137 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
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module.exports = {
'import'
],
globals: {
'$$PREBID_GLOBAL$$': false,
'BROWSERSTACK_USERNAME': false,
'BROWSERSTACK_KEY': false,
'FEATURES': 'readonly',
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[![Build Status](https://circleci.com/gh/prebid/Prebid.js.svg?style=svg)](https://circleci.com/gh/prebid/Prebid.js)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/prebid/Prebid.js.svg)](http://isitmaintained.com/project/prebid/Prebid.js "Percentage of issues still open")
[![Coverage Status](https://coveralls.io/repos/github/prebid/Prebid.js/badge.svg)](https://coveralls.io/github/prebid/Prebid.js)
[![Total Alerts](https://img.shields.io/lgtm/alerts/g/prebid/Prebid.js.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/prebid/Prebid.js/alerts/)

# Prebid.js

Expand Down Expand Up @@ -109,6 +108,8 @@ pbjs.requestBids({

## Install



$ git clone https://github.com/prebid/Prebid.js.git
$ cd Prebid.js
$ npm ci
Expand Down Expand Up @@ -359,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
3 changes: 2 additions & 1 deletion features.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[
"NATIVE"
"NATIVE",
"VIDEO"
]
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>
29 changes: 20 additions & 9 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 Down Expand Up @@ -67,12 +75,15 @@
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: true,
params: {
pid: 'TEST01',
}
}]
},
userSync: {
Expand All @@ -81,7 +92,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 b137e3d

Please sign in to comment.