Skip to content

Commit

Permalink
Prebid 9: Move bidders iframes urls to config
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Komorski authored and Marcin Komorski committed May 28, 2024
1 parent bca27f4 commit c58e53b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 30 deletions.
31 changes: 1 addition & 30 deletions modules/topicsFpdModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,6 @@ export function reset() {
iframeLoadedURL = [];
}

const bidderIframeList = {
maxTopicCaller: 4,
bidders: [{
bidder: 'pubmatic',
iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html'
}, {
bidder: 'rtbhouse',
iframeURL: 'https://topics.authorizedvault.com/topicsapi.html'
}, {
bidder: 'openx',
iframeURL: 'https://pa.openx.net/topics_frame.html'
}, {
bidder: 'improvedigital',
iframeURL: 'https://hb.360yield.com/privacy-sandbox/topics.html'
}, {
bidder: 'onetag',
iframeURL: 'https://onetag-sys.com/static/topicsapi.html'
}, {
bidder: 'taboola',
iframeURL: 'https://cdn.taboola.com/libtrc/static/topics/taboola-prebid-browsing-topics.html'
}, {
bidder: 'discovery',
iframeURL: 'https://api.popin.cc/topic/prebid-topics-frame.html'
}, {
bidder: 'undertone',
iframeURL: 'https://creative-p.undertone.com/spk-public/topics_frame.html'
}]
}

export const coreStorage = getCoreStorageManager(MODULE_NAME);
export const topicStorageName = 'prebid:topics';
export const lastUpdated = 'lastUpdated';
Expand Down Expand Up @@ -240,7 +211,7 @@ function listenMessagesFromTopicIframe() {
*/
export function loadTopicsForBidders(doc = document) {
if (!isTopicsSupported(doc)) return;
const topics = config.getConfig('userSync.topics') || bidderIframeList;
const topics = config.getConfig('userSync.topics');

if (topics) {
listenMessagesFromTopicIframe();
Expand Down
34 changes: 34 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,35 @@ const GRANULARITY_OPTIONS = {

const ALL_TOPICS = '*';

const DEFAULT_IFRAMES_CONFIG = {
maxTopicCaller: 4,
bidders: [{
bidder: 'pubmatic',
iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html'
}, {
bidder: 'rtbhouse',
iframeURL: 'https://topics.authorizedvault.com/topicsapi.html'
}, {
bidder: 'openx',
iframeURL: 'https://pa.openx.net/topics_frame.html'
}, {
bidder: 'improvedigital',
iframeURL: 'https://hb.360yield.com/privacy-sandbox/topics.html'
}, {
bidder: 'onetag',
iframeURL: 'https://onetag-sys.com/static/topicsapi.html'
}, {
bidder: 'taboola',
iframeURL: 'https://cdn.taboola.com/libtrc/static/topics/taboola-prebid-browsing-topics.html'
}, {
bidder: 'discovery',
iframeURL: 'https://api.popin.cc/topic/prebid-topics-frame.html'
}, {
bidder: 'undertone',
iframeURL: 'https://creative-p.undertone.com/spk-public/topics_frame.html'
}]
}

export function newConfig() {
let listeners = [];
let defaults;
Expand Down Expand Up @@ -160,6 +189,11 @@ export function newConfig() {

// default max nested iframes for referer detection
maxNestedIframes: DEFAULT_MAX_NESTED_IFRAMES,

// default bidders iframes urls
userSync: {
topics: DEFAULT_IFRAMES_CONFIG
}
};

Object.defineProperties(newConfig,
Expand Down

0 comments on commit c58e53b

Please sign in to comment.