这是indexloc提供的服务,不要输入任何密码
Skip to content
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
3 changes: 2 additions & 1 deletion modules/azerionedgeRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ export function getAudiences() {
*/
export function setAudiencesToBidders(reqBidsConfigObj, config, audiences) {
const defaultBidders = ['improvedigital'];
const bidders = config.params?.bidders || defaultBidders;
const configBidders = config.params?.bidders || [];
const bidders = [...new Set([...defaultBidders, ...configBidders])];
bidders.forEach((bidderCode) =>
mergeDeep(reqBidsConfigObj.ortb2Fragments.bidder, {
[bidderCode]: {
Expand Down
2 changes: 1 addition & 1 deletion modules/azerionedgeRtdProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pbjs.setConfig(
| name | `String` | RTD sub module name | Always "azerionedge" |
| waitForIt | `Boolean` | Required to ensure that the auction is delayed for the module to respond. | Optional. Defaults to false but recommended to true. |
| params.key | `String` | Publisher partner specific key | Mandatory. The key is required for the module to work. If you haven't received one, please reach [support@improvedigital.com](support@improvedigital.com) |
| params.bidders | `Array` | Bidders with which to share segment information | Optional. Defaults to "improvedigital". |
| params.bidders | `Array` | Additional bidders with which to share segment information. | Optional. Automatically includes "improvedigital". |
| params.process | `Object` | Configuration for the Azerion Edge script. | Optional. Defaults to `{}`. |

## Context
Expand Down
6 changes: 3 additions & 3 deletions test/spec/modules/azerionedgeRtdProvider_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Azerion Edge RTD submodule', function () {
];
const IMPROVEDIGITAL_GVLID = '253';
const key = 'publisher123';
const bidders = ['appnexus', 'improvedigital'];
const bidders = ['appnexus'];
const process = { key: 'value' };
const dataProvider = { name: 'azerionedge', waitForIt: true };
const userConsent = {gdpr: {gdprApplies: 'gdpr-applies', consentString: 'consent-string'}, usp: 'usp'};
Expand Down Expand Up @@ -174,7 +174,7 @@ describe('Azerion Edge RTD submodule', function () {
},
};

it('for improvedigital by default', function () {
it('for improvedigital is always added', function () {
azerionedgeRTD.setAudiencesToBidders(
reqBidsConfigObj,
dataProvider,
Expand All @@ -185,7 +185,7 @@ describe('Azerion Edge RTD submodule', function () {
).to.deep.equal(expected);
});

bidders.forEach((bidder) => {
[...bidders, 'improvedigital'].forEach((bidder) => {
it(`for ${bidder}`, function () {
const config = { ...dataProvider, params: { bidders } };
azerionedgeRTD.setAudiencesToBidders(reqBidsConfigObj, config, audiences);
Expand Down