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

Feature/regex #353

Merged
merged 6 commits into from
Nov 11, 2019
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["pubmaticBidAdapter","appnexusBidAdapter","userId","pubCommonId","identityLinkIdSystem","digiTrustIdSystem","id5IdSystem","customIdSystem","unifiedIdSystem"]
["pubmaticBidAdapter","pubmaticServerBidAdapter","appnexusBidAdapter","userId","pubCommonId","identityLinkIdSystem","digiTrustIdSystem","id5IdSystem","customIdSystem","unifiedIdSystem"]
4 changes: 2 additions & 2 deletions modules/pubmaticBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function _parseAdSlot(bid) {
bid.params.adUnit = splits[0];
if (splits.length > 1) {
// i.e size is specified in adslot, so consider that and ignore sizes array
splits = splits[1].split('x');
splits = splits.length == 2 ? splits[1].split('x') : splits.length == 3 ? splits[2].split('x') : [];
if (splits.length != 2) {
utils.logWarn(LOG_WARN_PREFIX + 'AdSlot Error: adSlot not in required format');
return;
Expand Down Expand Up @@ -520,7 +520,7 @@ function _createImpressionObject(bid, conf) {

impObj = {
id: bid.bidId,
tagid: bid.params.adUnit || undefined,
tagid: bid.params.hashedKey || bid.params.adUnit || undefined,
bidfloor: _parseSlotParam('kadfloor', bid.params.kadfloor),
secure: 1,
ext: {
Expand Down
7 changes: 5 additions & 2 deletions modules/pubmaticServerBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ export const spec = {
ad: firstSummary ? bid.adm : '',
cpm: (parseFloat(summary.bid) || 0).toFixed(2),
serverSideResponseTime: partnerResponseTimeObj[summary.bidder] || 0,
mi: miObj.hasOwnProperty(summary.bidder) ? miObj[summary.bidder] : UNDEFINED
mi: miObj.hasOwnProperty(summary.bidder) ? miObj[summary.bidder] : UNDEFINED,
regexPattern: summary.regex || undefined
}
break;
default:
Expand Down Expand Up @@ -434,7 +435,9 @@ export const spec = {
- setting serverSideResponseTime as -1, in cases where errorCode is 1,2 or 6. In these cases we do not log this bid in logger
- explicitly setting serverSideResponseTime = 0, where errorCode is 5, i.e. PARTNER_TIMEDOUT_ERROR
*/
mi: miObj.hasOwnProperty(summary.bidder) ? miObj[summary.bidder] : undefined
mi: miObj.hasOwnProperty(summary.bidder) ? miObj[summary.bidder] : undefined,
regexPattern: summary.regex || undefined

}
}
});
Expand Down