From eca81f29b4b087979a9a85b86c7040b1b335866e Mon Sep 17 00:00:00 2001 From: Chris Corbo Date: Mon, 15 May 2023 11:21:17 -0400 Subject: [PATCH] chore: update default video placement value [PB-1560] --- 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 () {