From aaa300f931e62800411462c13bf443967773f4a6 Mon Sep 17 00:00:00 2001 From: Giudici-a <34242194+Giudici-a@users.noreply.github.com> Date: Tue, 6 Apr 2021 10:55:55 +0200 Subject: [PATCH] adot bid adapter: add publisher path from bidder config to endpoint url (#6476) --- modules/adotBidAdapter.js | 5 +++-- modules/adotBidAdapter.md | 20 +++++++++++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/modules/adotBidAdapter.js b/modules/adotBidAdapter.js index 54bd9156b48..502ef05b0d5 100644 --- a/modules/adotBidAdapter.js +++ b/modules/adotBidAdapter.js @@ -7,7 +7,7 @@ import { config } from '../src/config.js'; const ADAPTER_VERSION = 'v1.0.0'; const BID_METHOD = 'POST'; -const BIDDER_URL = 'https://dsp.adotmob.com/headerbidding/bidrequest'; +const BIDDER_URL = 'https://dsp.adotmob.com/headerbidding{PUBLISHER_PATH}/bidrequest'; const FIRST_PRICE = 1; const NET_REVENUE = true; // eslint-disable-next-line no-template-curly-in-string @@ -141,9 +141,10 @@ function validateServerRequest(serverRequest) { } function createServerRequestFromAdUnits(adUnits, bidRequestId, adUnitContext) { + const publisherPath = config.getConfig('adot.publisherPath') === undefined ? '' : '/' + config.getConfig('adot.publisherPath'); return { method: BID_METHOD, - url: BIDDER_URL, + url: BIDDER_URL.replace('{PUBLISHER_PATH}', publisherPath), data: generateBidRequestsFromAdUnits(adUnits, bidRequestId, adUnitContext), _adot_internal: generateAdotInternal(adUnits) } diff --git a/modules/adotBidAdapter.md b/modules/adotBidAdapter.md index e1388311e23..98a4a1a5970 100644 --- a/modules/adotBidAdapter.md +++ b/modules/adotBidAdapter.md @@ -6,7 +6,7 @@ Adot Bidder Adapter is a module that enables the communication between the Prebi - Module name: Adot Bidder Adapter - Module type: Bidder Adapter -- Maintainer: `maxime.lequain@we-are-adot.com` +- Maintainer: `aurelien.giudici@adotmob.com` - Supported media types: `banner`, `video`, `native` ## Example ad units @@ -230,4 +230,22 @@ pbjs.setBidderConfig({ } } }); +``` + +### Specific publisher path + +You can set a specific publisher path using `pbjs.setBidderConfig` for the bidder `adot` +The bidrequest will add this path to the bidder endpoint + +#### Example + +```javascript +pbjs.setBidderConfig({ + bidders: ['adot'], + config: { + adot: { + publisherPath: '__MY_PUBLISHER_PATH__' + } + } +}); ``` \ No newline at end of file