Skip to content

Commit

Permalink
Fix BIDDER_CODE const
Browse files Browse the repository at this point in the history
  • Loading branch information
eldzis committed Dec 7, 2023
1 parent e06d20a commit b678786
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions modules/setupadBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import * as events from '../src/events.js';
import { BANNER } from '../src/mediaTypes.js';
import CONSTANTS from '../src/constants.json';

const BIDDER_CODE = 'setupad';
const ENDPOINT = 'https://prebid.setupad.io/openrtb2/auction';
const SYNC_ENDPOINT = 'https://cookie.stpd.cloud/sync?';
const REPORT_ENDPOINT = 'https://adapter-analytics.azurewebsites.net/api/adapter-analytics';
Expand All @@ -33,7 +32,7 @@ function getEids(bidRequest) {
}

export const spec = {
code: BIDDER_CODE,
code: 'setupad',
supportedMediaTypes: [BANNER],
gvlid: GVLID,

Expand Down Expand Up @@ -213,7 +212,7 @@ export const spec = {
getPixelUrl: function (eventName, bid, timestamp) {
let bidder = bid.bidder || bid.bidderCode;
const auctionId = bid.auctionId;
if (bidder !== BIDDER_CODE) return;
if (bidder !== 'setupad') return;

let params;
if (bid.params) {
Expand Down Expand Up @@ -261,14 +260,6 @@ export const spec = {
extraBidParams = `&cpm=${bid.originalCpm}&currency=${bid.originalCurrency}`;
}

if (
eventName === CONSTANTS.EVENTS.BID_REQUESTED ||
eventName === CONSTANTS.EVENTS.BID_TIMEOUT ||
eventName === CONSTANTS.EVENTS.NO_BID
) {
bidder = BIDDER_CODE;
}

const url = `${REPORT_ENDPOINT}?event=${eventName}&bidder=${bidder}&placementIds=${placementIds}&auctionId=${auctionId}${extraBidParams}&timestamp=${timestamp}`;

return url;
Expand Down

0 comments on commit b678786

Please sign in to comment.