From a390afe8ae3a8dee6ffa36cfe1593cb0089d1e8c Mon Sep 17 00:00:00 2001 From: Adam Prime Date: Thu, 11 Feb 2021 18:55:39 -0500 Subject: [PATCH 1/2] add warning for non-string adSlots - and update the markdown file to say they should be strings --- modules/pubmaticBidAdapter.js | 3 +++ modules/pubmaticBidAdapter.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/pubmaticBidAdapter.js b/modules/pubmaticBidAdapter.js index c70ecb4af27..07e5b62ac26 100644 --- a/modules/pubmaticBidAdapter.js +++ b/modules/pubmaticBidAdapter.js @@ -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 ''; } diff --git a/modules/pubmaticBidAdapter.md b/modules/pubmaticBidAdapter.md index a34df148630..76c2e0c8efc 100644 --- a/modules/pubmaticBidAdapter.md +++ b/modules/pubmaticBidAdapter.md @@ -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 pmzoneid: 'zone1, zone11', // optional lat: '40.712775', // optional lon: '-74.005973', // optional From b7acdf8b1722b5ce5562587b8da37b04d3f20055 Mon Sep 17 00:00:00 2001 From: Adam Prime Date: Fri, 12 Feb 2021 10:01:36 -0500 Subject: [PATCH 2/2] be more specific in explanatory comment --- modules/pubmaticBidAdapter.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/pubmaticBidAdapter.md b/modules/pubmaticBidAdapter.md index 76c2e0c8efc..e9d93d79758 100644 --- a/modules/pubmaticBidAdapter.md +++ b/modules/pubmaticBidAdapter.md @@ -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, must be wrapped in quotes + 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