Skip to content

Commit

Permalink
Pubmatic add warning for non-string adSlots (prebid#6304)
Browse files Browse the repository at this point in the history
* add warning for non-string adSlots

- and update the markdown file to say they should be strings

* be more specific in explanatory comment
  • Loading branch information
jsut authored and stsepelin committed May 28, 2021
1 parent 47ba1d8 commit 34b49a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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
4 changes: 2 additions & 2 deletions modules/pubmaticBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ var adUnits = [
bids: [{
bidder: 'pubmatic',
params: {
publisherId: '156209', // required, must be wrapped in quotes
publisherId: '156209', // required, must be a string, not an integer or other js type.
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 a string, not an integer or other js type.
pmzoneid: 'zone1, zone11', // optional
lat: '40.712775', // optional
lon: '-74.005973', // optional
Expand Down

0 comments on commit 34b49a4

Please sign in to comment.