Skip to content

Commit

Permalink
Retrieving placement Id from bid request params
Browse files Browse the repository at this point in the history
  • Loading branch information
adtech-sky committed May 29, 2024
1 parent ae9bb80 commit 9cb7fb0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/opscoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ export const spec = {
Array.isArray(bid.mediaTypes?.banner?.sizes)),

buildRequests: (validBidRequests, bidderRequest) => {
const {publisherId, placementId, siteId} = validBidRequests[0].params;
if (!validBidRequests || !bidderRequest) {
return;
}

const {publisherId, siteId} = validBidRequests[0].params;

const payload = {
id: bidderRequest.bidderRequestId,
Expand All @@ -28,7 +32,7 @@ export const spec = {
banner: {format: extractSizes(bidRequest)},
ext: {
opsco: {
placementId: placementId,
placementId: bidRequest.params.placementId,
publisherId: publisherId,
}
}
Expand Down

0 comments on commit 9cb7fb0

Please sign in to comment.