From e96193727a95faef9a1580b44eedecb4a82ceb3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Iwa=C5=84czak?= <36727380+piwanczak@users.noreply.github.com> Date: Fri, 16 Jun 2023 17:12:33 +0200 Subject: [PATCH 1/6] Update topicsFpdModule.md Addition of RTB House's Topics API iframe support --- modules/topicsFpdModule.js | 3 +++ modules/topicsFpdModule.md | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/topicsFpdModule.js b/modules/topicsFpdModule.js index 4cb11af48fc..227ec8a6e65 100644 --- a/modules/topicsFpdModule.js +++ b/modules/topicsFpdModule.js @@ -19,6 +19,9 @@ const bidderIframeList = { bidders: [{ bidder: 'pubmatic', iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html' + },{ + bidder: 'rtbhouse', + iframeURL: 'https://topics.creativecdn.com/tapi.html' }] } export const coreStorage = getCoreStorageManager(MODULE_NAME); diff --git a/modules/topicsFpdModule.md b/modules/topicsFpdModule.md index b1bc3cb0d5b..3ea083b2d96 100644 --- a/modules/topicsFpdModule.md +++ b/modules/topicsFpdModule.md @@ -36,6 +36,10 @@ pbjs.setConfig({ bidder: 'pubmatic', iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html', expiry: 7 // Configurable expiry days + },{ + bidder: 'rtbhouse', + iframeURL: 'https://topics.creativecdn.com/tapi.html', + expiry: 7 // Configurable expiry days },{ bidder: 'rubicon', iframeURL: 'https://rubicon.com:8080/topics/fpd/topic.html', // dummy URL @@ -59,4 +63,4 @@ pbjs.setConfig({ | topics.bidders | no | Array of objects | Array of topics callers with the iframe locations and other necessary informations like bidder(Bidder code) and expiry. Default Array of topics in the module itself.| | topics.bidders[].bidder | yes | string | Bidder Code of the bidder(SSP). | | topics.bidders[].iframeURL | yes | string | URL which is hosted on bidder/SSP/third-party domains which will call Topics API. | -| topics.bidders[].expiry | no | integer | Max number of days where Topics data will be persist. If Data is stored for more than mentioned expiry day, it will be deleted from storage. Default is 21 days which is hardcoded in Module. | \ No newline at end of file +| topics.bidders[].expiry | no | integer | Max number of days where Topics data will be persist. If Data is stored for more than mentioned expiry day, it will be deleted from storage. Default is 21 days which is hardcoded in Module. | From cd7a6f9a064c7c168a6d8d2d011224d8d3eeb802 Mon Sep 17 00:00:00 2001 From: Przemyslaw Iwanczak Date: Fri, 16 Jun 2023 17:28:16 +0200 Subject: [PATCH 2/6] chore: make linter happy - fixing typo --- modules/topicsFpdModule.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/topicsFpdModule.js b/modules/topicsFpdModule.js index 227ec8a6e65..01fdbc2ecf0 100644 --- a/modules/topicsFpdModule.js +++ b/modules/topicsFpdModule.js @@ -19,7 +19,7 @@ const bidderIframeList = { bidders: [{ bidder: 'pubmatic', iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html' - },{ + }, { bidder: 'rtbhouse', iframeURL: 'https://topics.creativecdn.com/tapi.html' }] From a0494fcd51e8eb0cca7f1227c6e28b1c8d73650e Mon Sep 17 00:00:00 2001 From: Przemyslaw Iwanczak Date: Sun, 25 Jun 2023 15:38:11 +0200 Subject: [PATCH 3/6] m: post-review fixes --- modules/topicsFpdModule.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/topicsFpdModule.js b/modules/topicsFpdModule.js index 01fdbc2ecf0..d85feb43151 100644 --- a/modules/topicsFpdModule.js +++ b/modules/topicsFpdModule.js @@ -21,7 +21,7 @@ const bidderIframeList = { iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html' }, { bidder: 'rtbhouse', - iframeURL: 'https://topics.creativecdn.com/tapi.html' + iframeURL: 'https://topics.primeaudience.com/topics-api.html' }] } export const coreStorage = getCoreStorageManager(MODULE_NAME); From a8f6be138db822adfe36b51ac390fb184a57e905 Mon Sep 17 00:00:00 2001 From: Przemyslaw Iwanczak Date: Mon, 26 Jun 2023 17:35:18 +0200 Subject: [PATCH 4/6] chore: changed domains --- modules/topicsFpdModule.js | 2 +- modules/topicsFpdModule.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/topicsFpdModule.js b/modules/topicsFpdModule.js index d85feb43151..ff39f4b666f 100644 --- a/modules/topicsFpdModule.js +++ b/modules/topicsFpdModule.js @@ -21,7 +21,7 @@ const bidderIframeList = { iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html' }, { bidder: 'rtbhouse', - iframeURL: 'https://topics.primeaudience.com/topics-api.html' + iframeURL: 'https://topics.authorizedvault.com/topics.html' }] } export const coreStorage = getCoreStorageManager(MODULE_NAME); diff --git a/modules/topicsFpdModule.md b/modules/topicsFpdModule.md index 3ea083b2d96..1be8cd9a920 100644 --- a/modules/topicsFpdModule.md +++ b/modules/topicsFpdModule.md @@ -38,7 +38,7 @@ pbjs.setConfig({ expiry: 7 // Configurable expiry days },{ bidder: 'rtbhouse', - iframeURL: 'https://topics.creativecdn.com/tapi.html', + iframeURL: 'https://topics.authorizedvault.com/topics.html', expiry: 7 // Configurable expiry days },{ bidder: 'rubicon', From d8b1751640841367d6d1f8a8134dd6949eedd0eb Mon Sep 17 00:00:00 2001 From: Przemyslaw Iwanczak Date: Mon, 26 Jun 2023 17:40:48 +0200 Subject: [PATCH 5/6] chore: changed domains --- modules/topicsFpdModule.js | 2 +- modules/topicsFpdModule.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/topicsFpdModule.js b/modules/topicsFpdModule.js index ff39f4b666f..6b911c2fda0 100644 --- a/modules/topicsFpdModule.js +++ b/modules/topicsFpdModule.js @@ -21,7 +21,7 @@ const bidderIframeList = { iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html' }, { bidder: 'rtbhouse', - iframeURL: 'https://topics.authorizedvault.com/topics.html' + iframeURL: 'https://topics.authorizedvault.com/topicsapi.html' }] } export const coreStorage = getCoreStorageManager(MODULE_NAME); diff --git a/modules/topicsFpdModule.md b/modules/topicsFpdModule.md index 1be8cd9a920..e9b828847da 100644 --- a/modules/topicsFpdModule.md +++ b/modules/topicsFpdModule.md @@ -38,7 +38,7 @@ pbjs.setConfig({ expiry: 7 // Configurable expiry days },{ bidder: 'rtbhouse', - iframeURL: 'https://topics.authorizedvault.com/topics.html', + iframeURL: 'https://topics.authorizedvault.com/topicsapi.html', expiry: 7 // Configurable expiry days },{ bidder: 'rubicon', From 394a94514d4b02416915248a58722e4a36f1360a Mon Sep 17 00:00:00 2001 From: Przemyslaw Iwanczak Date: Fri, 7 Jul 2023 10:48:14 +0200 Subject: [PATCH 6/6] make tests happy --- modules/topicsFpdModule.js | 2 +- modules/topicsFpdModule.md | 2 +- test/spec/modules/topicsFpdModule_spec.js | 14 ++++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/modules/topicsFpdModule.js b/modules/topicsFpdModule.js index 6b911c2fda0..97d86d5aff2 100644 --- a/modules/topicsFpdModule.js +++ b/modules/topicsFpdModule.js @@ -15,7 +15,7 @@ let LOAD_TOPICS_INITIALISE = false; const HAS_DEVICE_ACCESS = hasDeviceAccess(); const bidderIframeList = { - maxTopicCaller: 1, + maxTopicCaller: 2, bidders: [{ bidder: 'pubmatic', iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html' diff --git a/modules/topicsFpdModule.md b/modules/topicsFpdModule.md index e9b828847da..6ef0bf241dd 100644 --- a/modules/topicsFpdModule.md +++ b/modules/topicsFpdModule.md @@ -63,4 +63,4 @@ pbjs.setConfig({ | topics.bidders | no | Array of objects | Array of topics callers with the iframe locations and other necessary informations like bidder(Bidder code) and expiry. Default Array of topics in the module itself.| | topics.bidders[].bidder | yes | string | Bidder Code of the bidder(SSP). | | topics.bidders[].iframeURL | yes | string | URL which is hosted on bidder/SSP/third-party domains which will call Topics API. | -| topics.bidders[].expiry | no | integer | Max number of days where Topics data will be persist. If Data is stored for more than mentioned expiry day, it will be deleted from storage. Default is 21 days which is hardcoded in Module. | +| topics.bidders[].expiry | no | integer | Max number of days where Topics data will be persist. If Data is stored for more than mentioned expiry day, it will be deleted from storage. Default is 21 days which is hardcoded in Module. | \ No newline at end of file diff --git a/test/spec/modules/topicsFpdModule_spec.js b/test/spec/modules/topicsFpdModule_spec.js index 958489f2728..22d7a98d45d 100644 --- a/test/spec/modules/topicsFpdModule_spec.js +++ b/test/spec/modules/topicsFpdModule_spec.js @@ -372,11 +372,16 @@ describe('getCachedTopics()', () => { } ]; - const evt = { + const evt_pm = { data: '{"segment":{"domain":"ads.pubmatic.com","topics":[{"configVersion":"chrome.1","modelVersion":"2206021246","taxonomyVersion":"1","topic":165,"version":"chrome.1:1:2206021246"}],"bidder":"pubmatic"},"date":1669743901858}', origin: 'https://ads.pubmatic.com' }; + const evt_rh = { + data: '{"segment":{"domain":"topics.authorizedvault.com","topics":[{"configVersion":"chrome.1","modelVersion":"2206021246","taxonomyVersion":"1","topic":165,"version":"chrome.1:1:2206021246"}],"bidder":"rtbhouse"},"date":1669743901858}', + origin: 'https://topics.authorizedvault.com' + }; + let gdprDataHdlrStub; beforeEach(() => { gdprDataHdlrStub = sinon.stub(gdprDataHandler, 'getConsentData'); @@ -413,9 +418,10 @@ describe('getCachedTopics()', () => { it('should stored segments if receiveMessage event is triggerred with segment data', () => { return processFpd({}, {global: {}}, {data: Promise.resolve(mockData)}) .then(({global}) => { - receiveMessage(evt); + receiveMessage(evt_pm); + receiveMessage(evt_rh); let segments = new Map(safeJSONParse(storage.getDataFromLocalStorage(topicStorageName))); - expect(segments.has('pubmatic')).to.equal(true); + expect(segments.has('pubmatic') || segments.has('rtbhouse')).to.equal(true); }); }); @@ -424,7 +430,7 @@ describe('getCachedTopics()', () => { storage.setDataInLocalStorage(topicStorageName, storedSegments); return processFpd({}, {global: {}}, {data: Promise.resolve(mockData)}) .then(({global}) => { - receiveMessage(evt); + receiveMessage(evt_pm); let segments = new Map(safeJSONParse(storage.getDataFromLocalStorage(topicStorageName))); expect(segments.get('pubmatic')[2206021246].segment.length).to.equal(1); });