Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IX Bid Adapter: change default video.placement value #9948

Merged
merged 1 commit into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions modules/ixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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`);
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion test/spec/modules/ixBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down