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

PubmaticBidAdapter: Using plcmt instead of placement #11623

Merged
merged 22 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d8c3dcc
Merge pull request #1 from prebid/master
pm-nitin-shirsat Oct 11, 2022
2dedab6
Implement functionality for deal priority
pm-nitin-shirsat Oct 12, 2022
afae888
Update test cases
pm-nitin-shirsat Oct 12, 2022
9447e84
kick off test manually
ChrisHuie Oct 13, 2022
400af75
Merge branch 'master' of https://github.com/prebid/Prebid.js into pre…
pm-nitin-shirsat May 3, 2023
5896b10
Merge branch 'prebid-master'
pm-nitin-shirsat May 3, 2023
ade41d3
Added support of GPP to PubMatic adapter
pm-nitin-shirsat May 3, 2023
7d0b86d
Merge pull request #3 from prebid/master
pm-nitin-shirsat May 12, 2023
caeae1a
Merge branch 'prebid-master-new' into master
pm-nitin-shirsat Jun 29, 2023
f21764b
Merge pull request #5 from pm-nitin-shirsat/master
pm-nitin-shirsat Jun 29, 2023
826e6e7
Merge pull request #6 from pm-nitin-shirsat/prebid-master-new
pm-nitin-shirsat Jun 29, 2023
92846e9
gpp_sid in user syncs supposed to encode as a string, not an array
pm-nitin-shirsat Jun 30, 2023
f92818a
Remove extra space
pm-nitin-shirsat Jul 5, 2023
fcb0dde
Remove trailing spaces
pm-nitin-shirsat Jul 5, 2023
51fc097
Merge pull request #7 from prebid/master
pm-nitin-shirsat Jul 31, 2023
6a72e8c
Merge pull request #8 from prebid/master
pm-nitin-shirsat Aug 25, 2023
2432d2f
Merge pull request #9 from prebid/master
pm-nitin-shirsat Sep 12, 2023
9fc89c6
Merge pull request #10 from prebid/master
pm-nitin-shirsat May 22, 2024
70b6e36
Remove the placement parameter and update test cases accordingly, Add…
pm-nitin-shirsat May 23, 2024
a3667c1
Supporting placement parameter and logging warning message, for the p…
pm-nitin-shirsat May 24, 2024
484c691
Remove commented code
pm-nitin-shirsat May 28, 2024
39af04f
Merge pull request #11 from prebid/master
pm-nitin-shirsat May 30, 2024
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
6 changes: 3 additions & 3 deletions modules/pubmaticBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const DEFAULT_HEIGHT = 0;
const PREBID_NATIVE_HELP_LINK = 'http://prebid.org/dev-docs/show-native-ads.html';
const PUBLICATION = 'pubmatic'; // Your publication on Blue Billywig, potentially with environment (e.g. publication.bbvms.com or publication.test.bbvms.com)
const RENDERER_URL = 'https://pubmatic.bbvms.com/r/'.concat('$RENDERER', '.js'); // URL of the renderer application
const MSG_VIDEO_PLACEMENT_MISSING = 'Video.Placement param missing';
const MSG_VIDEO_PLCMT_MISSING = 'Video.plcmt param missing';

const CUSTOM_PARAMS = {
'kadpageurl': '', // Custom page url
Expand Down Expand Up @@ -560,8 +560,8 @@ function _createBannerRequest(bid) {

export function checkVideoPlacement(videoData, adUnitCode) {
// Check for video.placement property. If property is missing display log message.
if (FEATURES.VIDEO && !deepAccess(videoData, 'placement')) {
logWarn(MSG_VIDEO_PLACEMENT_MISSING + ' for ' + adUnitCode);
if (FEATURES.VIDEO && !deepAccess(videoData, 'plcmt')) {
logWarn(MSG_VIDEO_PLCMT_MISSING + ' for ' + adUnitCode);
};
}

Expand Down
10 changes: 5 additions & 5 deletions test/spec/modules/pubmaticBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4046,10 +4046,10 @@ describe('PubMatic adapter', function () {
});

if (FEATURES.VIDEO) {
describe('Checking for Video.Placement property', function() {
describe('Checking for Video.plcmt property', function() {
let sandbox, utilsMock;
const adUnit = 'Div1';
const msg_placement_missing = 'Video.Placement param missing for Div1';
const msg_placement_missing = 'Video.plcmt param missing for Div1';
let videoData = {
battr: [6, 7],
skipafter: 15,
Expand All @@ -4073,12 +4073,12 @@ describe('PubMatic adapter', function () {
sandbox.restore();
})

it('should log Video.Placement param missing', function() {
it('should log Video.plcmt param missing', function() {
checkVideoPlacement(videoData, adUnit);
sinon.assert.calledWith(utils.logWarn, msg_placement_missing);
})
it('shoud not log Video.Placement param missing', function() {
videoData['placement'] = 1;
it('shoud not log Video.plcmt param missing', function() {
videoData['plcmt'] = 1;
checkVideoPlacement(videoData, adUnit);
sinon.assert.neverCalledWith(utils.logWarn, msg_placement_missing);
})
Expand Down