Skip to content

Commit

Permalink
nextMillenniumBidAdapter: fixed a bug where there was no requestId in…
Browse files Browse the repository at this point in the history
… the response (prebid#12304)

* added support for gpp consent string

* changed test for nextMillenniumBidAdapter

* added some tests

* added site.pagecat, site.content.cat and site.content.language to request

* lint fix

* formated code

* formated code

* formated code

* pachage-lock with prebid

* pachage-lock with prebid

* formatted code

* added device.sua, user.eids

* formatted

* fixed tests

* fixed bug functio getSua

* NextMillennium: Sending a request with several imp objects.

* nextMillenniumBidAdapter: fixed bug - bid.requestId is undefined

* nextMillenniumBidAdapter: fixed bug - bid.requestId is undefined - 2
  • Loading branch information
mhlm authored Oct 9, 2024
1 parent 7ee65bd commit cc5bf6b
Show file tree
Hide file tree
Showing 2 changed files with 244 additions and 192 deletions.
9 changes: 7 additions & 2 deletions modules/nextMillenniumBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {config} from '../src/config.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {getRefererInfo} from '../src/refererDetection.js';

const NM_VERSION = '4.0.0';
const NM_VERSION = '4.0.1';
const PBJS_VERSION = 'v$prebid.version$';
const GVLID = 1060;
const BIDDER_CODE = 'nextMillennium';
Expand Down Expand Up @@ -80,6 +80,7 @@ export const spec = {

buildRequests: function(validBidRequests, bidderRequest) {
const requests = [];
const bidIds = {};
window.nmmRefreshCounts = window.nmmRefreshCounts || {};
const site = getSiteObj();
const device = getDeviceObj();
Expand Down Expand Up @@ -109,6 +110,8 @@ export const spec = {
if (i === 0) postBody.cur = cur;
postBody.imp.push(getImp(bid, id, mediaTypes));
postBody.ext.next_mil_imps.push(getExtNextMilImp(bid));

bidIds[bid.adUnitCode] = bid.bidId;
});

this.getUrlPixelMetric(EVENTS.BID_REQUESTED, validBidRequests);
Expand All @@ -121,6 +124,8 @@ export const spec = {
contentType: 'text/plain',
withCredentials: true,
},

bidIds,
});

return requests;
Expand All @@ -133,7 +138,7 @@ export const spec = {
const bids = [];
_each(response.seatbid, (resp) => {
_each(resp.bid, (bid) => {
const requestId = bidRequest.bidId;
const requestId = bidRequest.bidIds[bid.impid];

const {ad, adUrl, vastUrl, vastXml} = getAd(bid);

Expand Down
Loading

0 comments on commit cc5bf6b

Please sign in to comment.