diff --git a/modules/1plusXRtdProvider.js b/modules/1plusXRtdProvider.js index 390f4f4cd81..3d859af9681 100644 --- a/modules/1plusXRtdProvider.js +++ b/modules/1plusXRtdProvider.js @@ -14,7 +14,6 @@ const ORTB2_NAME = '1plusX.com' const PAPI_VERSION = 'v1.0'; const LOG_PREFIX = '[1plusX RTD Module]: '; const OPE_FPID = 'ope_fpid' -const LEGACY_SITE_KEYWORDS_BIDDERS = ['appnexus']; export const segtaxes = { // cf. https://github.com/InteractiveAdvertisingBureau/openrtb/pull/108 AUDIENCE: 526, @@ -152,17 +151,6 @@ const getTargetingDataFromPapi = (papiUrl) => { * @returns {Object} Object describing the updates to make on bidder configs */ export const buildOrtb2Updates = ({ segments = [], topics = [] }, bidder) => { - // Currently appnexus bidAdapter doesn't support topics in `site.content.data.segment` - // Therefore, writing them in `site.keywords` until it's supported - // Other bidAdapters do fine with `site.content.data.segment` - const writeToLegacySiteKeywords = LEGACY_SITE_KEYWORDS_BIDDERS.includes(bidder); - if (writeToLegacySiteKeywords) { - const site = { - keywords: topics.join(',') - }; - return { site }; - } - const userData = { name: ORTB2_NAME, segment: segments.map((segmentId) => ({ id: segmentId })) @@ -216,14 +204,6 @@ export const updateBidderConfig = (bidder, ortb2Updates, bidderConfigs) => { return bidderConfigCopy; }; -const setAppnexusAudiences = (audiences) => { - config.setConfig({ - appnexusAuctionKeywords: { - '1plusX': audiences, - }, - }); -} - /** * Updates bidder configs with the targeting data retreived from Profile API * @param {Object} papiResponse Response from Profile API @@ -243,10 +223,6 @@ export const setTargetingDataToConfig = (papiResponse, { bidders }) => { config: updatedBidderConfig }); } - if (bidder === 'appnexus') { - // Do the legacy stuff for appnexus with segments - setAppnexusAudiences(segments); - } } } diff --git a/test/spec/modules/1plusXRtdProvider_spec.js b/test/spec/modules/1plusXRtdProvider_spec.js index 8657c37d7d8..1570785a5de 100644 --- a/test/spec/modules/1plusXRtdProvider_spec.js +++ b/test/spec/modules/1plusXRtdProvider_spec.js @@ -195,18 +195,6 @@ describe('1plusXRtdProvider', () => { } expect([ortb2Updates]).to.deep.include.members([expectedOutput]); }); - it('fills site.keywords in the ortb2 config (appnexus specific)', () => { - const rtdData = { segments: fakeResponse.s, topics: fakeResponse.t }; - const ortb2Updates = buildOrtb2Updates(rtdData, 'appnexus'); - - const expectedOutput = { - site: { - keywords: rtdData.topics.join(','), - } - } - expect([ortb2Updates]).to.deep.include.members([expectedOutput]); - }); - it('defaults to empty array if no segment is given', () => { const rtdData = { topics: fakeResponse.t }; const ortb2Updates = buildOrtb2Updates(rtdData, randomBidder()); @@ -242,17 +230,6 @@ describe('1plusXRtdProvider', () => { } expect(ortb2Updates).to.deep.include(expectedOutput); }) - it('defaults to empty string if no topic is given (appnexus specific)', () => { - const rtdData = { segments: fakeResponse.s }; - const ortb2Updates = buildOrtb2Updates(rtdData, 'appnexus'); - - const expectedOutput = { - site: { - keywords: '', - } - } - expect(ortb2Updates).to.deep.include(expectedOutput); - }) }) describe('extractConsent', () => { @@ -384,24 +361,6 @@ describe('1plusXRtdProvider', () => { expect(newBidderConfig.ortb2.user).to.deep.include(bidderConfigInitial.ortb2.user); }) - it('merges fetched data in bidderConfig for configured bidders (appnexus specific)', () => { - const bidder = 'appnexus'; - // Set initial config - config.setBidderConfig({ - bidders: [bidder], - config: bidderConfigInitial - }); - // Call submodule's setBidderConfig - const newBidderConfig = updateBidderConfig(bidder, ortb2UpdatesAppNexus, config.getBidderConfig()); - - // Check that the targeting data has been set in the config - expect(newBidderConfig).not.to.be.null; - expect(newBidderConfig.ortb2.site).to.deep.include(ortb2UpdatesAppNexus.site); - // Check that existing config didn't get erased - expect(newBidderConfig.ortb2.site).to.deep.include(bidderConfigInitial.ortb2.site); - expect(newBidderConfig.ortb2.user).to.deep.include(bidderConfigInitial.ortb2.user); - }) - it('overwrites an existing 1plus.com entry in ortb2.user.data', () => { const bidder = randomBidder(); // Set initial config @@ -495,7 +454,7 @@ describe('1plusXRtdProvider', () => { } it('sets the config for the selected bidders', () => { - const bidders = ['appnexus', 'rubicon']; + const bidders = ['rubicon']; // setting initial config for those bidders config.setBidderConfig({ bidders,