Skip to content

Pubmatic Bid Adapter: Add warning for non-string adSlots #6304

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

Merged
merged 2 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions modules/pubmaticBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ function _cleanSlot(slotName) {
if (utils.isStr(slotName)) {
return slotName.replace(/^\s+/g, '').replace(/\s+$/g, '');
}
if (slotName) {
utils.logWarn(BIDDER_CODE + ': adSlot must be a string. Ignoring adSlot');
}
return '';
}

Expand Down
2 changes: 1 addition & 1 deletion modules/pubmaticBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var adUnits = [
params: {
publisherId: '156209', // required, must be wrapped in quotes
oustreamAU: 'renderer_test_pubmatic', // required if mediaTypes-> video-> context is 'outstream' and optional if renderer is defined in adUnits or in mediaType video. This value can be get by BlueBillyWig Team.
adSlot: 'pubmatic_test2', // optional
adSlot: 'pubmatic_test2', // optional, must be wrapped in quotes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be wrapped in quotes is an odd way of saying must be a string, when i first read it, i thought it meant must have escaped quotes as the first and last character of the string.

how about: must be a string, not an integer or other js type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied the text that pubmatic (i assume) used on publisherId. I'll update both to say String, which i agree makes more sense.

pmzoneid: 'zone1, zone11', // optional
lat: '40.712775', // optional
lon: '-74.005973', // optional
Expand Down