diff --git a/modules/azerionedgeRtdProvider.js b/modules/azerionedgeRtdProvider.js index 7e8a32e6f93..6eabf08b851 100644 --- a/modules/azerionedgeRtdProvider.js +++ b/modules/azerionedgeRtdProvider.js @@ -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]: { diff --git a/modules/azerionedgeRtdProvider.md b/modules/azerionedgeRtdProvider.md index e1bdf792647..09ff33d66e9 100644 --- a/modules/azerionedgeRtdProvider.md +++ b/modules/azerionedgeRtdProvider.md @@ -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 diff --git a/test/spec/modules/azerionedgeRtdProvider_spec.js b/test/spec/modules/azerionedgeRtdProvider_spec.js index 0eef82a2512..5a5bad62fa2 100644 --- a/test/spec/modules/azerionedgeRtdProvider_spec.js +++ b/test/spec/modules/azerionedgeRtdProvider_spec.js @@ -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'}; @@ -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, @@ -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);