Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adot Bid Adapter: add publisher path from bidder config #6476

Merged
merged 1 commit into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions modules/adotBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down
20 changes: 19 additions & 1 deletion modules/adotBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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__'
}
}
});
```