Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from prebid/master
Browse files Browse the repository at this point in the history
merge master
  • Loading branch information
pro-nsk authored Nov 12, 2020
2 parents f83d92b + 7d97720 commit 699fa14
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/adotBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js';
import {isStr, isArray, isNumber, isPlainObject, isBoolean, logError, replaceAuctionPrice} from '../src/utils.js';
import find from 'core-js-pure/features/array/find.js';
import { config } from '../src/config.js';

const ADAPTER_VERSION = 'v1.0.0';
const BID_METHOD = 'POST';
Expand Down Expand Up @@ -334,13 +335,17 @@ function generateSiteFromAdUnitContext(adUnitContext) {
if (!adUnitContext || !adUnitContext.refererInfo) return null;

const domain = extractSiteDomainFromURL(adUnitContext.refererInfo.referer);
const publisherId = config.getConfig('adot.publisherId');

if (!domain) return null;

return {
page: adUnitContext.refererInfo.referer,
domain: domain,
name: domain
name: domain,
publisher: {
id: publisherId
}
};
}

Expand Down
17 changes: 17 additions & 0 deletions modules/adotBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,20 @@ const adUnit = {
}]
}
```

### PublisherId

You can set a publisherId using `pbjs.setBidderConfig` for the bidder `adot`

#### Example

```javascript
pbjs.setBidderConfig({
bidders: ['adot'],
config: {
adot: {
publisherId: '__MY_PUBLISHER_ID__'
}
}
});
```

0 comments on commit 699fa14

Please sign in to comment.