From 7cbedf03a18c74a168a8da38e6bc69d0ed3bd7da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Sok=C3=B3=C5=82?= <88041828+krzysztofequativ@users.noreply.github.com> Date: Tue, 30 May 2023 19:12:31 +0200 Subject: [PATCH 1/8] Smartadserver Bid Adapter: support GPID (#10004) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Smartadserver Bid Adapter: Add support for SDA user and site * Smartadserver Bid Adapter: Fix SDA support getConfig and add to unit testing * support floors per media type * Add GPP support * Rework payloads enriching * Add gpid support --------- Co-authored-by: Meven Courouble Co-authored-by: Krzysztof Sokół <88041828+smart-adserver@users.noreply.github.com> --- modules/smartadserverBidAdapter.js | 5 +++ .../modules/smartadserverBidAdapter_spec.js | 42 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/modules/smartadserverBidAdapter.js b/modules/smartadserverBidAdapter.js index fd2d6e16463..4b7e65cae87 100644 --- a/modules/smartadserverBidAdapter.js +++ b/modules/smartadserverBidAdapter.js @@ -159,6 +159,11 @@ export const spec = { sdc: sellerDefinedContext }; + const gpid = deepAccess(bid, 'ortb2Imp.ext.gpid', deepAccess(bid, 'ortb2Imp.ext.data.pbadslot', '')); + if (gpid) { + payload.gpid = gpid; + } + if (bidderRequest) { if (bidderRequest.gdprConsent) { payload.addtl_consent = bidderRequest.gdprConsent.addtlConsent; diff --git a/test/spec/modules/smartadserverBidAdapter_spec.js b/test/spec/modules/smartadserverBidAdapter_spec.js index 504ff978e9e..9142b730b27 100644 --- a/test/spec/modules/smartadserverBidAdapter_spec.js +++ b/test/spec/modules/smartadserverBidAdapter_spec.js @@ -1,6 +1,7 @@ import { expect } from 'chai'; import { BANNER, VIDEO } from 'src/mediaTypes.js'; import { config } from 'src/config.js'; +import { deepClone } from 'src/utils.js'; import { spec } from 'modules/smartadserverBidAdapter.js'; // Default params with optional ones @@ -1339,4 +1340,45 @@ describe('Smart bid adapter tests', function () { expect(bannerRequest).to.have.property('formatid').and.to.equal('90'); }); }); + + describe('Global Placement ID (GPID)', function () { + it('should not include gpid by default', () => { + const request = spec.buildRequests(DEFAULT_PARAMS_WO_OPTIONAL); + const requestContent = JSON.parse(request[0].data); + + expect(requestContent).to.not.have.property('gdid'); + }); + + it('should include gpid if pbadslot in ortb2Imp', () => { + const gpid = '/19968336/header-bid-tag-1'; + const bidRequests = deepClone(DEFAULT_PARAMS_WO_OPTIONAL); + + bidRequests[0].ortb2Imp = { + ext: { + data: { + pbadslot: gpid + } + } + }; + + const request = spec.buildRequests(bidRequests); + const requestContent = JSON.parse(request[0].data); + + expect(requestContent).to.have.property('gpid').and.to.equal(gpid); + }); + + it('should include gpid if imp[].ext.gpid exists', () => { + const gpid = '/1111/homepage#div-leftnav'; + const bidRequests = deepClone(DEFAULT_PARAMS_WO_OPTIONAL); + + bidRequests[0].ortb2Imp = { + ext: { gpid } + }; + + const request = spec.buildRequests(bidRequests); + const requestContent = JSON.parse(request[0].data); + + expect(requestContent).to.have.property('gpid').and.to.equal(gpid); + }); + }); }); From 68d572ede149c94770226d485efd108061bcb9e9 Mon Sep 17 00:00:00 2001 From: ccorbo Date: Tue, 30 May 2023 13:34:42 -0400 Subject: [PATCH 2/8] chore: update default video placement value [PB-1560] (#9948) Co-authored-by: Chris Corbo --- modules/ixBidAdapter.js | 7 +++++-- test/spec/modules/ixBidAdapter_spec.js | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/ixBidAdapter.js b/modules/ixBidAdapter.js index 652574402a8..736b3336cd8 100644 --- a/modules/ixBidAdapter.js +++ b/modules/ixBidAdapter.js @@ -145,6 +145,7 @@ export const FEATURE_TOGGLES = { let siteID = 0; let gdprConsent = ''; let usPrivacy = ''; +let defaultVideoPlacement = false; // Possible values for bidResponse.seatBid[].bid[].mtype which indicates the type of the creative markup so that it can properly be associated with the right sub-object of the BidRequest.Imp. const MEDIA_TYPES = { @@ -223,7 +224,8 @@ function bidToVideoImp(bid) { if (deepAccess(videoParamRef, 'playerConfig.floatOnScroll')) { imp.video.placement = 5; } else { - imp.video.placement = 4; + imp.video.placement = 3; + defaultVideoPlacement = true; } } else { logWarn(`IX Bid Adapter: Video context '${context}' is not supported`); @@ -1111,7 +1113,8 @@ function buildIXDiag(validBidRequests) { ren: false, version: '$prebid.version$', userIds: _getUserIds(validBidRequests[0]), - url: window.location.href.split('?')[0] + url: window.location.href.split('?')[0], + vpd: defaultVideoPlacement }; // create ad unit map and collect the required diag properties diff --git a/test/spec/modules/ixBidAdapter_spec.js b/test/spec/modules/ixBidAdapter_spec.js index 874f5048ce0..967aec46d71 100644 --- a/test/spec/modules/ixBidAdapter_spec.js +++ b/test/spec/modules/ixBidAdapter_spec.js @@ -2596,7 +2596,8 @@ describe('IndexexchangeAdapter', function () { const impression = extractPayload(request).imp[0]; expect(impression.id).to.equal(DEFAULT_VIDEO_VALID_BID[0].bidId); - expect(impression.video.placement).to.equal(4); + expect(impression.video.placement).to.equal(3); + expect(extractPayload(request).ext.ixdiag.vpd).to.equal(true); }); it('should handle unexpected context', function () { From 4a3d5a74694133b693496d6f799b7add3b78b0de Mon Sep 17 00:00:00 2001 From: Reinout Stevens <518971+ReinoutStevens@users.noreply.github.com> Date: Tue, 30 May 2023 22:50:28 +0200 Subject: [PATCH 3/8] ShareThrough Bid Adapter : fix playerSize (#10011) * fix sharethrough playersize * fix unit test --------- Co-authored-by: Reinout Stevens --- modules/sharethroughBidAdapter.js | 4 ++-- test/spec/modules/sharethroughBidAdapter_spec.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/sharethroughBidAdapter.js b/modules/sharethroughBidAdapter.js index 9c91af8b130..d089ba5f130 100644 --- a/modules/sharethroughBidAdapter.js +++ b/modules/sharethroughBidAdapter.js @@ -93,8 +93,8 @@ export const sharethroughAdapterSpec = { if (videoRequest) { // default playerSize, only change this if we know width and height are properly defined in the request let [w, h] = [640, 360]; - if (videoRequest.playerSize && videoRequest.playerSize[0] && videoRequest.playerSize[1]) { - [w, h] = videoRequest.playerSize; + if (videoRequest.playerSize && videoRequest.playerSize[0] && videoRequest.playerSize[0][0] && videoRequest.playerSize[0][1]) { + [w, h] = videoRequest.playerSize[0]; } impression.video = { diff --git a/test/spec/modules/sharethroughBidAdapter_spec.js b/test/spec/modules/sharethroughBidAdapter_spec.js index fc4fbc86018..c14b1fccf09 100644 --- a/test/spec/modules/sharethroughBidAdapter_spec.js +++ b/test/spec/modules/sharethroughBidAdapter_spec.js @@ -230,7 +230,7 @@ describe('sharethrough adapter spec', function () { api: [3], mimes: ['video/3gpp'], protocols: [2, 3], - playerSize: [640, 480], + playerSize: [[640, 480]], startdelay: 42, skipmin: 10, skipafter: 20, From 122d62441f9012d0718f6535fc8f9c692deb3827 Mon Sep 17 00:00:00 2001 From: southern-growthcode <79725079+southern-growthcode@users.noreply.github.com> Date: Tue, 30 May 2023 18:19:33 -0400 Subject: [PATCH 4/8] GrowthCode RTD : initial release (#9852) * The New RTD Module * GrowthCode new RTD Module * Fixed to Prebid Added Testing Added Docs * Fixed to Prebid Added Testing Added Docs * Completed testing spec * Update the MD file to provide more infomation about what the module does * Update sample to point to the correct server for testing. --- integrationExamples/gpt/growthcode.html | 29 ++-- modules/growthCodeRtdProvider.js | 130 ++++++++++++++++++ modules/growthCodeRtdProvider.md | 55 ++++++++ .../modules/growthCodeRtdProvider_spec.js | 127 +++++++++++++++++ 4 files changed, 332 insertions(+), 9 deletions(-) create mode 100644 modules/growthCodeRtdProvider.js create mode 100644 modules/growthCodeRtdProvider.md create mode 100644 test/spec/modules/growthCodeRtdProvider_spec.js diff --git a/integrationExamples/gpt/growthcode.html b/integrationExamples/gpt/growthcode.html index ede51d2d869..d8ad6c4a5af 100644 --- a/integrationExamples/gpt/growthcode.html +++ b/integrationExamples/gpt/growthcode.html @@ -7,10 +7,13 @@