Skip to content

Commit

Permalink
Merge branch 'master' into rw-jixie-pass-gpid-etc
Browse files Browse the repository at this point in the history
* master: (107 commits)
  Increment version to 8.11.0-pre
  Prebid 8.10.0 release
  add privacyIcon to not native asset list (prebid#10259)
  gppControl_usstates: activity controls for US state consent (prebid#10283)
  UserID: check for all consent (not just GDPR) to check if an ID needs refreshing (prebid#10286)
  fluct Bid Adapter: add user.data to bid requests (prebid#10318)
  Prebid Server adapter: improve cookie_sync tests, check GPP fields are populated (prebid#10362)
  fix: consolidate banner format array (prebid#10365)
  consentManagementGpp: support GPP 1.1 (prebid#10282)
  Relay Bid Adapter : Initial Release (prebid#10197)
  Yieldmo Bid Adapter : adding 4.x VAST protocol support (prebid#10363)
  Cadent Aperture MX Bid Adapter: support GPP and GPP Section Ids (prebid#10342)
  identityLinkSubmodule: add additional check on retrieving the envelope (prebid#10355)
  fluct Bid Adapter: add gpid to bid requests (prebid#10361)
  Increment version to 8.10.0-pre
  Prebid 8.9.0 release
  fledgeForGpt: consolidate publisher configuration (prebid#10360)
  ConcertBidAdapter: Add `browserLanguage` to request `meta` object (prebid#10356)
  GrowthCode Analytics: Updates/BugFixes (prebid#10339)
  Activity Controls GPP: invalidate covered = 0 in mspa (prebid#10354)
  ...
  • Loading branch information
jxdeveloper1 committed Aug 18, 2023
2 parents e2eb4c3 + efc9524 commit 5ef588b
Show file tree
Hide file tree
Showing 203 changed files with 12,062 additions and 2,903 deletions.
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>

15 changes: 3 additions & 12 deletions integrationExamples/gpt/growthcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,11 @@
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({
Expand All @@ -80,7 +71,7 @@
auctionDelay: 1000,
dataProviders: [{
name: 'growthCodeRtd',
waitForIt: true,
waitForIt: false,
params: {
pid: 'TEST01',
}
Expand Down
109 changes: 0 additions & 109 deletions integrationExamples/gpt/pbjs_video_adUnit.html

This file was deleted.

72 changes: 72 additions & 0 deletions integrationExamples/topics/topics-server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// This is an example of a server-side endpoint that is utilizing the Topics API header functionality.
// Note: This test endpoint requires the following to run: node.js, npm, express, cors, body-parser

const bodyParser = require('body-parser');
const cors = require('cors');
const express = require('express');

const port = process.env.PORT || 3000;

const app = express();
app.use(cors());
app.use(
bodyParser.urlencoded({
extended: true,
})
);
app.use(bodyParser.json());
app.use(express.static('public'));
app.set('port', port);

const listener = app.listen(port, () => {
const host =
listener.address().address === '::'
? 'http://localhost'
: 'http://' + listener.address().address;
// eslint-disable-next-line no-console
console.log(
`${__filename} is listening on ${host}:${listener.address().port}\n`
);
});

app.get('*', (req, res) => {
res.setHeader('Observe-Browsing-Topics', '?1');

const resData = {
segment: {
domain: req.hostname,
topics: generateTopicArrayFromHeader(req.headers['sec-browsing-topics']),
bidder: req.query['bidder'],
},
date: Date.now(),
};

res.json(resData);
});

const generateTopicArrayFromHeader = (topicString) => {
const result = [];
const topicArray = topicString.split(', ');
if (topicArray.length > 1) {
topicArray.pop();
topicArray.map((topic) => {
const topicId = topic.split(';')[0];
const versionsString = topic.split(';')[1].split('=')[1];
const [config, taxonomy, model] = versionsString.split(':');
const numTopicsWithSameVersions = topicId
.substring(1, topicId.length - 1)
.split(' ');

numTopicsWithSameVersions.map((tpId) => {
result.push({
topic: tpId,
version: versionsString,
configVersion: config,
taxonomyVersion: taxonomy,
modelVersion: model,
});
});
});
}
return result;
};
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
divId: 'player',
vendorCode: 1, // jwplayer vendorCode
playerConfig: {
licenseKey: 'IAjLREYRLylTWsfLN3FoN/O3iQLbs+AfgZLlkAoyH8gSf7TnNtmOLcR8CUY=',
licenseKey: 'zwqnWJlovTKhXv2JIcKBj0Si//K7cVPmBDEyaILcAMw+nVKaizsJRA==',
params: {
vendorConfig: {
file: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
divId: 'player',
vendorCode: 1, // JW Player vendorCode
playerConfig: {
licenseKey: 'IAjLREYRLylTWsfLN3FoN/O3iQLbs+AfgZLlkAoyH8gSf7TnNtmOLcR8CUY=',
licenseKey: 'zwqnWJlovTKhXv2JIcKBj0Si//K7cVPmBDEyaILcAMw+nVKaizsJRA==',
params: {
vendorConfig: {
file: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4',
Expand Down
137 changes: 137 additions & 0 deletions integrationExamples/videoModule/jwplayer/bidsBackHandlerOverride.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.jwplayer.com/libraries/l5MchIxB.js"></script>
<script async src="../../../build/dev/prebid.js"></script>

<title>JW Player with Bids Back Handler override</title>

<script>
// Setup ad units
const videoAdUnitCode = 'adUnitTestCode'
var videoAdUnit = {
code: videoAdUnitCode,
mediaTypes: {
video: {}
},
video: {
divId: 'player', // required to indicate which player is being used to render this ad unit.
},

bids: [{
bidder: 'ix',
params: {
siteId: '300',
}
}]
};

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

pbjs.que.push(function () {
pbjs.setConfig({
video: {
providers: [{
divId: 'player',
vendorCode: 1, // jwplayer vendorCode
playerConfig: {
licenseKey: 'zwqnWJlovTKhXv2JIcKBj0Si//K7cVPmBDEyaILcAMw+nVKaizsJRA==',
params: {
vendorConfig: {
file: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4',
advertising: { client: 'vast' }
}
}
},
},]
},
debugging: {
enabled: true,
intercept: [
{
when: {
adUnitCode: videoAdUnitCode,
},
then: {
cpm: 25,
currency: 'USD',
netRevenue: 100,
creativeId: 'testCreativeId',
ttl: 500,
mediaType: "video",
vastUrl: "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",
ad: "<VAST version=\"3.0\"> <Ad id=\"123\"> <InLine> <AdSystem>PubMatic</AdSystem> <AdTitle>VAST 2.0 Instream Test</AdTitle> <Description>VAST 2.0 Instream Test</Description> <Error> <![CDATA[https://aktrack.pubmatic.com/er=[ERRORCODE]]]> </Error> <Impression> <![CDATA[https://aktrack.pubmatic.com?e=impression]]> </Impression> <Creatives> <Creative AdID=\"123\"> <Linear> <Duration>00:00:30</Duration> <TrackingEvents> <Tracking event=\"creativeView\"> <![CDATA[https://aktrack.pubmatic.com?e=creativeView]]> </Tracking> <Tracking event=\"start\"> <![CDATA[https://aktrack.pubmatic.com?e=start]]> </Tracking> <Tracking event=\"midpoint\"> <![CDATA[https://aktrack.pubmatic.com?e=midpoint]]> </Tracking> <Tracking event=\"firstQuartile\"> <![CDATA[https://aktrack.pubmatic.com?e=firstQuartile]]> </Tracking> <Tracking event=\"thirdQuartile\"> <![CDATA[https://aktrack.pubmatic.com?e=thirdQuartile]]> </Tracking> <Tracking event=\"complete\"> <![CDATA[https://aktrack.pubmatic.com?e=complete]]> </Tracking> </TrackingEvents> <VideoClicks> <ClickThrough> <![CDATA[https://www.pubmatic.com]]> </ClickThrough> </VideoClicks> <MediaFiles> <MediaFile delivery=\"progressive\" type=\"video/mp4\" bitrate=\"500\" width=\"480\" height=\"460\" scalable=\"true\" maintainAspectRatio=\"true\"> <![CDATA[https://staging.pubmatic.com:8443/test/spinning-logo-480x360_video.mp4]]> </MediaFile> <MediaFile delivery=\"progressive\" type=\"video/ogg\" bitrate=\"500\" width=\"480\" height=\"460\" scalable=\"true\" maintainAspectRatio=\"true\"> <![CDATA[https://staging.pubmatic.com:8443/test/spinning-logo-480x360_video.ogg]]> </MediaFile> <MediaFile delivery=\"progressive\" type=\"video/x-flv\" bitrate=\"500\" width=\"400\" height=\"300\" scalable=\"true\" maintainAspectRatio=\"true\"> <![CDATA[https://staging.pubmatic.com:8443/test/PubMatic_test_video.flv]]> </MediaFile> </MediaFiles> </Linear> </Creative> <Creative AdID=\"123\"> <NonLinearAds> <TrackingEvents></TrackingEvents> <NonLinear height=\"50\" width=\"300\" minSuggestedDuration=\"00:00:05\"> <StaticResource creativeType=\"image/jpeg\"> <![CDATA[https://staging.pubmatic.com:8443/test/PubMatic_LetsBeClear_300x50.jpeg]]> </StaticResource> <NonLinearClickThrough> <![CDATA[https://www.pubmatic.com]]> </NonLinearClickThrough> </NonLinear> </NonLinearAds> </Creative> <Creative AdID=\"123\"> <CompanionAds> <Companion width=\"300\" height=\"250\"> <StaticResource creativeType=\"image/jpeg\"> <![CDATA[https://staging.pubmatic.com:8443/test/PubMatic_LetsBeClear_320x250.jpg]]> </StaticResource> <CompanionClickThrough> <![CDATA[https://www.pubmatic.com]]> </CompanionClickThrough> </Companion> </CompanionAds> </Creative> </Creatives> </InLine> </Ad> </VAST>"
}
},
]
}
});

pbjs.addAdUnits([videoAdUnit]);

pbjs.onEvent('videoSetupComplete', e => {
console.log('player setup successfully: ', e);
});

pbjs.onEvent('videoSetupFailed', e => {
console.log('player setup failed: ', e);
});

pbjs.onEvent('videoAdError', e => {
console.log('Ad Error: ', e);
});

pbjs.onEvent('videoAdImpression', e => {
console.log('Ad Impression: ', e);
});

pbjs.onEvent('videoBidError', e => {
console.log('An Ad Error came from a Bid: ', e);
});

pbjs.onEvent('videoBidImpression', e => {
console.log('An Ad Impression came from a Bid: ', e);
});

pbjs.requestBids({
adUnitCodes: [videoAdUnitCode],
bidsBackHandler: function(bidResponses) {
const bidResponse = bidResponses[videoAdUnitCode];
if (!bidResponse) {
return;
}

bidResponse.bids.forEach(bid => {
const videoUrl = pbjs.adServers.dfp.buildVideoUrl({
adUnit: videoAdUnit,
url: bid.vastUrl,
params: {
iu: '/19968336/prebid_cache_video_adunit',
cust_params: {
section: "blog",
anotherKey: "anotherValue"
},
hl: "en",
output: "xml_vast2",
url: "https://www.example.com",
}
});

bid.vastUrl = videoUrl;
pbjs.videoModule.renderBid('player', bid);
});
}
});

});
</script>
</head>

<body>
<h2>JW Player with Bids Back Handler override</h2>
<h5>Div-1: Player placeholder div</h5>
<div id ="player"></div>
</body>

</html>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
divId: 'player',
vendorCode: 1, // vendorCode for jwplayer
playerConfig: {
licenseKey: 'IAjLREYRLylTWsfLN3FoN/O3iQLbs+AfgZLlkAoyH8gSf7TnNtmOLcR8CUY=',
licenseKey: 'zwqnWJlovTKhXv2JIcKBj0Si//K7cVPmBDEyaILcAMw+nVKaizsJRA==',
params: {
vendorConfig: {
file: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/SubaruOutbackOnStreetAndDirt.mp4',
Expand Down
2 changes: 1 addition & 1 deletion integrationExamples/videoModule/jwplayer/eventsUI.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
divId: 'player',
vendorCode: 1, // jwplayer vendorCode
playerConfig: {
licenseKey: '577+5vXsluqV2Uy0drAS8wrgiqJlYijZxz3DmoYDm8FTJjdoIe8zYA==',
licenseKey: 'zwqnWJlovTKhXv2JIcKBj0Si//K7cVPmBDEyaILcAMw+nVKaizsJRA==',
params: {
vendorConfig: {
playlist: [{
Expand Down
Loading

0 comments on commit 5ef588b

Please sign in to comment.