Skip to content

Commit

Permalink
Seeding Alliance Bid Adapter: change bidder URL and add versioning (p…
Browse files Browse the repository at this point in the history
…rebid#8298)

* add seedingAlliance Adapter

* add two native default params

* ...

* ...

* seedingAlliance Adapter: add two more default native params

* updating seedingAlliance Adapter

* seedingAlliance Adapter

* quickfix no bids + net revenue

* bugfix replace auction price

* change URL  and add versioning

Co-authored-by: Jonas Hilsen <hilsen@seeding-alliance.de>
  • Loading branch information
SeedingAllianceTech and sag-jonhil authored Apr 19, 2022
1 parent b34e5f7 commit 2c0518f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions modules/seedingAllianceBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { config } from '../src/config.js';

const BIDDER_CODE = 'seedingAlliance';
const DEFAULT_CUR = 'EUR';
const ENDPOINT_URL = 'https://b.nativendo.de/cds/rtb/bid?format=openrtb2.5&ssp=nativendo';
const ENDPOINT_URL = 'https://b.nativendo.de/cds/rtb/bid?format=openrtb2.5&ssp=pb';

const NATIVE_ASSET_IDS = {0: 'title', 1: 'body', 2: 'sponsoredBy', 3: 'image', 4: 'cta', 5: 'icon'};

Expand Down Expand Up @@ -124,7 +124,8 @@ export const spec = {
user: {},
regs: {
ext: {
gdpr: 0
gdpr: 0,
pb_ver: '$prebid.version$'
}
}
};
Expand Down Expand Up @@ -187,20 +188,23 @@ registerBidder(spec);
function parseNative(bid) {
const {assets, link, imptrackers} = bid.adm.native;

let clickUrl = link.url.replace(/\$\{AUCTION_PRICE\}/g, bid.price);

if (link.clicktrackers) {
link.clicktrackers.forEach(function (clicktracker, index) {
link.clicktrackers[index] = clicktracker.replace(/\$\{AUCTION_PRICE\}/g, bid.price);
});
}

if (imptrackers) {
imptrackers.forEach(function (imptracker, index) {
imptrackers[index] = imptracker.replace(/\$\{AUCTION_PRICE\}/g, bid.price);
});
}

const result = {
url: link.url,
clickUrl: link.url,
url: clickUrl,
clickUrl: clickUrl,
clickTrackers: link.clicktrackers || undefined,
impressionTrackers: imptrackers || undefined
};
Expand Down

0 comments on commit 2c0518f

Please sign in to comment.