From c2f20466eb83053c21d630acf8f6b8a280325b0a Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 25 Mar 2021 12:04:39 -0400 Subject: [PATCH 01/23] Update eids.js --- modules/userId/eids.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/userId/eids.js b/modules/userId/eids.js index 9b26eff2ebf..a0b19e884d5 100644 --- a/modules/userId/eids.js +++ b/modules/userId/eids.js @@ -93,7 +93,7 @@ const USER_IDS_CONFIG = { // britepoolId 'britepoolid': { source: 'britepool.com', - atype: 1 + atype: 3 }, // lotamePanoramaId @@ -111,7 +111,7 @@ const USER_IDS_CONFIG = { // merkleId 'merkleId': { source: 'merkleinc.com', - atype: 1 + atype: 3 }, // NetId @@ -161,7 +161,7 @@ const USER_IDS_CONFIG = { // Verizon Media ConnectID 'connectid': { source: 'verizonmedia.com', - atype: 1 + atype: 3 }, // Neustar Fabrick From c422dc9397df5880cc7c706f0de1f8923cf7506e Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 25 Mar 2021 12:18:31 -0400 Subject: [PATCH 02/23] Update eids_spec.js --- test/spec/modules/eids_spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/spec/modules/eids_spec.js b/test/spec/modules/eids_spec.js index 659e5257e90..61111dcd2cc 100644 --- a/test/spec/modules/eids_spec.js +++ b/test/spec/modules/eids_spec.js @@ -90,7 +90,7 @@ describe('eids array generation for known sub-modules', function() { expect(newEids.length).to.equal(1); expect(newEids[0]).to.deep.equal({ source: 'merkleinc.com', - uids: [{id: 'some-random-id-value', atype: 1}] + uids: [{id: 'some-random-id-value', atype: 3}] }); }); @@ -117,7 +117,7 @@ describe('eids array generation for known sub-modules', function() { expect(newEids.length).to.equal(1); expect(newEids[0]).to.deep.equal({ source: 'liveintent.com', - uids: [{id: 'some-random-id-value', atype: 1}], + uids: [{id: 'some-random-id-value', atype: 3}], ext: {segments: ['s1', 's2']} }); }); @@ -132,7 +132,7 @@ describe('eids array generation for known sub-modules', function() { expect(newEids.length).to.equal(1); expect(newEids[0]).to.deep.equal({ source: 'liveintent.com', - uids: [{id: 'some-random-id-value', atype: 1}] + uids: [{id: 'some-random-id-value', atype: 3}] }); }); @@ -144,7 +144,7 @@ describe('eids array generation for known sub-modules', function() { expect(newEids.length).to.equal(1); expect(newEids[0]).to.deep.equal({ source: 'britepool.com', - uids: [{id: 'some-random-id-value', atype: 1}] + uids: [{id: 'some-random-id-value', atype: 3}] }); }); From ec752ee2606911581555d4d570a0ffc32fff3b91 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 25 Mar 2021 12:19:08 -0400 Subject: [PATCH 03/23] Update eids.js --- modules/userId/eids.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/userId/eids.js b/modules/userId/eids.js index a0b19e884d5..918035a177f 100644 --- a/modules/userId/eids.js +++ b/modules/userId/eids.js @@ -80,7 +80,7 @@ const USER_IDS_CONFIG = { return data.lipbid; }, source: 'liveintent.com', - atype: 1, + atype: 3, getEidExt: function(data) { if (Array.isArray(data.segments) && data.segments.length) { return { From ea44e2108c6070469c6ea2e76fae68e95300fa80 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 25 Mar 2021 14:41:34 -0400 Subject: [PATCH 04/23] Update pubmaticBidAdapter_spec.js --- test/spec/modules/pubmaticBidAdapter_spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/spec/modules/pubmaticBidAdapter_spec.js b/test/spec/modules/pubmaticBidAdapter_spec.js index 09573fe9f85..4477ee4824f 100644 --- a/test/spec/modules/pubmaticBidAdapter_spec.js +++ b/test/spec/modules/pubmaticBidAdapter_spec.js @@ -1695,7 +1695,7 @@ describe('PubMatic adapter', function () { 'source': 'liveramp.com', 'uids': [{ 'id': 'identity-link-user-id', - 'atype': 1 + 'atype': 3 }] }]); }); @@ -1736,7 +1736,7 @@ describe('PubMatic adapter', function () { 'source': 'liveintent.com', 'uids': [{ 'id': 'live-intent-user-id', - 'atype': 1 + 'atype': 3 }] }]); }); @@ -1818,7 +1818,7 @@ describe('PubMatic adapter', function () { 'source': 'britepool.com', 'uids': [{ 'id': 'britepool-user-id', - 'atype': 1 + 'atype': 3 }] }]); }); From d44f2985f3f17e38b97ba790d807b1e802246b23 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 25 Mar 2021 14:42:17 -0400 Subject: [PATCH 05/23] Update eids.js --- modules/userId/eids.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/userId/eids.js b/modules/userId/eids.js index 918035a177f..37cbd70af95 100644 --- a/modules/userId/eids.js +++ b/modules/userId/eids.js @@ -71,7 +71,7 @@ const USER_IDS_CONFIG = { // identityLink 'idl_env': { source: 'liveramp.com', - atype: 1 + atype: 3 }, // liveIntentId From 10efcdda8340343491aa5764113eee12bed40749 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 25 Mar 2021 14:46:51 -0400 Subject: [PATCH 06/23] Update eids_spec.js --- test/spec/modules/eids_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/eids_spec.js b/test/spec/modules/eids_spec.js index 61111dcd2cc..26e42e0ae2c 100644 --- a/test/spec/modules/eids_spec.js +++ b/test/spec/modules/eids_spec.js @@ -102,7 +102,7 @@ describe('eids array generation for known sub-modules', function() { expect(newEids.length).to.equal(1); expect(newEids[0]).to.deep.equal({ source: 'liveramp.com', - uids: [{id: 'some-random-id-value', atype: 1}] + uids: [{id: 'some-random-id-value', atype: 3}] }); }); From 78fb35f5c315e8e970b0a2570227a71791a37e87 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 25 Mar 2021 14:48:00 -0400 Subject: [PATCH 07/23] Update conversantBidAdapter_spec.js --- test/spec/modules/conversantBidAdapter_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/modules/conversantBidAdapter_spec.js b/test/spec/modules/conversantBidAdapter_spec.js index d802cd288ef..0105626d97a 100644 --- a/test/spec/modules/conversantBidAdapter_spec.js +++ b/test/spec/modules/conversantBidAdapter_spec.js @@ -3,7 +3,7 @@ import {spec, storage} from 'modules/conversantBidAdapter.js'; import * as utils from 'src/utils.js'; import { createEidsArray } from 'modules/userId/eids.js'; -describe('Conversant adapter tests', function() { +describe('Conversant adapter tests', function() {/ const siteId = '108060'; const versionPattern = /^\d+\.\d+\.\d+(.)*$/; @@ -483,7 +483,7 @@ describe('Conversant adapter tests', function() { const payload = spec.buildRequests(requests).data; expect(payload).to.have.deep.nested.property('user.ext.eids', [ {source: 'adserver.org', uids: [{id: '223344', atype: 1, ext: {rtiPartner: 'TDID'}}]}, - {source: 'liveramp.com', uids: [{id: '334455', atype: 1}]} + {source: 'liveramp.com', uids: [{id: '334455', atype: 3}]} ]); }); }); From 5c082a1bbf1dc7fafb773082d3cbde18027ec8b8 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 25 Mar 2021 14:51:03 -0400 Subject: [PATCH 08/23] Update rubiconBidAdapter_spec.js --- test/spec/modules/rubiconBidAdapter_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/modules/rubiconBidAdapter_spec.js b/test/spec/modules/rubiconBidAdapter_spec.js index 36890a2891b..0b9f8e0da33 100644 --- a/test/spec/modules/rubiconBidAdapter_spec.js +++ b/test/spec/modules/rubiconBidAdapter_spec.js @@ -1498,7 +1498,7 @@ describe('the rubicon adapter', function () { // LiveIntent should exist expect(post.user.ext.eids[0].source).to.equal('liveintent.com'); expect(post.user.ext.eids[0].uids[0].id).to.equal('0000-1111-2222-3333'); - expect(post.user.ext.eids[0].uids[0].atype).to.equal(1); + expect(post.user.ext.eids[0].uids[0].atype).to.equal(3); expect(post.user.ext.eids[0]).to.have.property('ext').that.is.an('object'); expect(post.user.ext.eids[0].ext).to.have.property('segments').that.is.an('array'); expect(post.user.ext.eids[0].ext.segments[0]).to.equal('segA'); @@ -1506,7 +1506,7 @@ describe('the rubicon adapter', function () { // LiveRamp should exist expect(post.user.ext.eids[1].source).to.equal('liveramp.com'); expect(post.user.ext.eids[1].uids[0].id).to.equal('1111-2222-3333-4444'); - expect(post.user.ext.eids[1].uids[0].atype).to.equal(1); + expect(post.user.ext.eids[1].uids[0].atype).to.equal(3); // SharedId should exist expect(post.user.ext.eids[2].source).to.equal('sharedid.org'); expect(post.user.ext.eids[2].uids[0].id).to.equal('1111'); From 09741b071988f31511bc02ea77563dfc4b60b5a4 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 25 Mar 2021 14:51:40 -0400 Subject: [PATCH 09/23] Update conversantBidAdapter_spec.js --- test/spec/modules/conversantBidAdapter_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/conversantBidAdapter_spec.js b/test/spec/modules/conversantBidAdapter_spec.js index 0105626d97a..1cb6bd6c6d6 100644 --- a/test/spec/modules/conversantBidAdapter_spec.js +++ b/test/spec/modules/conversantBidAdapter_spec.js @@ -3,7 +3,7 @@ import {spec, storage} from 'modules/conversantBidAdapter.js'; import * as utils from 'src/utils.js'; import { createEidsArray } from 'modules/userId/eids.js'; -describe('Conversant adapter tests', function() {/ +describe('Conversant adapter tests', function() { const siteId = '108060'; const versionPattern = /^\d+\.\d+\.\d+(.)*$/; From f42f6d8923f8294e3427f8f5bedbe36da2a57a2e Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 25 Mar 2021 14:54:49 -0400 Subject: [PATCH 10/23] Delete test/spec/adapters directory --- test/spec/adapters/adbutler_spec.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test/spec/adapters/adbutler_spec.js diff --git a/test/spec/adapters/adbutler_spec.js b/test/spec/adapters/adbutler_spec.js deleted file mode 100644 index e69de29bb2d..00000000000 From 35de176af84f528c1ebc93894737fabd281fd2e5 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 25 Mar 2021 15:00:25 -0400 Subject: [PATCH 11/23] Update userId_spec.js --- test/spec/modules/userId_spec.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/spec/modules/userId_spec.js b/test/spec/modules/userId_spec.js index 95279380232..a5f0c8c24b7 100644 --- a/test/spec/modules/userId_spec.js +++ b/test/spec/modules/userId_spec.js @@ -938,7 +938,7 @@ describe('User ID', function () { expect(bid.userId.idl_env).to.equal('AiGNC8Z5ONyZKSpIPf'); expect(bid.userIdAsEids[0]).to.deep.equal({ source: 'liveramp.com', - uids: [{id: 'AiGNC8Z5ONyZKSpIPf', atype: 1}] + uids: [{id: 'AiGNC8Z5ONyZKSpIPf', atype: 3}] }); }); }); @@ -962,7 +962,7 @@ describe('User ID', function () { expect(bid.userId.idl_env).to.equal('AiGNC8Z5ONyZKSpIPf'); expect(bid.userIdAsEids[0]).to.deep.equal({ source: 'liveramp.com', - uids: [{id: 'AiGNC8Z5ONyZKSpIPf', atype: 1}] + uids: [{id: 'AiGNC8Z5ONyZKSpIPf', atype: 3}] }); }); }); @@ -1032,7 +1032,7 @@ describe('User ID', function () { expect(bid.userId.lipb.lipbid).to.equal('random-ls-identifier'); expect(bid.userIdAsEids[0]).to.deep.equal({ source: 'liveintent.com', - uids: [{id: 'random-ls-identifier', atype: 1}] + uids: [{id: 'random-ls-identifier', atype: 3}] }); }); }); @@ -1056,7 +1056,7 @@ describe('User ID', function () { expect(bid.userId.lipb.lipbid).to.equal('random-cookie-identifier'); expect(bid.userIdAsEids[0]).to.deep.equal({ source: 'liveintent.com', - uids: [{id: 'random-cookie-identifier', atype: 1}] + uids: [{id: 'random-cookie-identifier', atype: 3}] }); }); }); @@ -1440,7 +1440,7 @@ describe('User ID', function () { expect(bid.userId.lipb.segments).to.include('123'); expect(bid.userIdAsEids[0]).to.deep.equal({ source: 'liveintent.com', - uids: [{id: 'random-ls-identifier', atype: 1}], + uids: [{id: 'random-ls-identifier', atype: 3}], ext: {segments: ['123']} }); }); @@ -1469,7 +1469,7 @@ describe('User ID', function () { expect(bid.userId.lipb.segments).to.include('123'); expect(bid.userIdAsEids[0]).to.deep.equal({ source: 'liveintent.com', - uids: [{id: 'random-cookie-identifier', atype: 1}], + uids: [{id: 'random-cookie-identifier', atype: 3}], ext: {segments: ['123']} }); }); @@ -1494,7 +1494,7 @@ describe('User ID', function () { expect(bid.userId.britepoolid).to.equal('279c0161-5152-487f-809e-05d7f7e653fd'); expect(bid.userIdAsEids[0]).to.deep.equal({ source: 'britepool.com', - uids: [{id: '279c0161-5152-487f-809e-05d7f7e653fd', atype: 1}] + uids: [{id: '279c0161-5152-487f-809e-05d7f7e653fd', atype: 3}] }); }); }); @@ -1592,7 +1592,7 @@ describe('User ID', function () { expect(bid.userId.merkleId).to.equal('testmerkleId'); expect(bid.userIdAsEids[0]).to.deep.equal({ source: 'merkleinc.com', - uids: [{id: 'testmerkleId', atype: 1}] + uids: [{id: 'testmerkleId', atype: 3}] }); }); }); From 350141419b5620f2c7ece8484ef86dccdfab8547 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 14 Apr 2021 12:24:26 -0400 Subject: [PATCH 12/23] Delete iasBidAdapter.js --- modules/iasBidAdapter.js | 134 --------------------------------------- 1 file changed, 134 deletions(-) delete mode 100644 modules/iasBidAdapter.js diff --git a/modules/iasBidAdapter.js b/modules/iasBidAdapter.js deleted file mode 100644 index 733c123e769..00000000000 --- a/modules/iasBidAdapter.js +++ /dev/null @@ -1,134 +0,0 @@ -import * as utils from '../src/utils.js'; -import { registerBidder } from '../src/adapters/bidderFactory.js'; - -const BIDDER_CODE = 'ias'; - -const otherBidIds = []; - -function isBidRequestValid(bid) { - const { pubId, adUnitPath } = bid.params; - return !!(pubId && adUnitPath); -} - -/** - * Converts GPT-style size array into a string - * @param {Array} sizes: list of GPT-style sizes, e.g. [[300, 250], [300, 300]] - * @return {String} a string containing sizes, e.g. '[300.250,300.300]' - */ -function stringifySlotSizes(sizes) { - let result = ''; - if (utils.isArray(sizes)) { - result = sizes.reduce((acc, size) => { - acc.push(size.join('.')); - return acc; - }, []); - result = '[' + result.join(',') + ']'; - } - return result; -} - -function stringifySlot(bidRequest) { - const id = bidRequest.adUnitCode; - const ss = stringifySlotSizes(bidRequest.sizes); - const p = bidRequest.params.adUnitPath; - const slot = { id, ss, p }; - const keyValues = utils.getKeys(slot).map(function(key) { - return [key, slot[key]].join(':'); - }); - return '{' + keyValues.join(',') + '}'; -} - -function stringifyWindowSize() { - return [ window.innerWidth || -1, window.innerHeight || -1 ].join('.'); -} - -function stringifyScreenSize() { - return [ (window.screen && window.screen.width) || -1, (window.screen && window.screen.height) || -1 ].join('.'); -} - -function buildRequests(bidRequests) { - const IAS_HOST = 'https://pixel.adsafeprotected.com/services/pub'; - const anId = bidRequests[0].params.pubId; - - let queries = []; - queries.push(['anId', anId]); - queries = queries.concat(bidRequests.reduce(function(acc, request) { - acc.push(['slot', stringifySlot(request)]); - return acc; - }, [])); - - queries.push(['wr', stringifyWindowSize()]); - queries.push(['sr', stringifyScreenSize()]); - queries.push(['url', encodeURIComponent(window.location.href)]); - - const queryString = encodeURI(queries.map(qs => qs.join('=')).join('&')); - - bidRequests.forEach(function (request) { - if (bidRequests[0].bidId != request.bidId) { - otherBidIds.push(request.bidId); - } - }); - - return { - method: 'GET', - url: IAS_HOST, - data: queryString, - bidRequest: bidRequests[0] - }; -} - -function getPageLevelKeywords(response) { - let result = {}; - shallowMerge(result, response.brandSafety); - result.fr = response.fr; - result.custom = response.custom; - return result; -} - -function shallowMerge(dest, src) { - utils.getKeys(src).reduce((dest, srcKey) => { - dest[srcKey] = src[srcKey]; - return dest; - }, dest); -} - -function interpretResponse(serverResponse, request) { - const iasResponse = serverResponse.body; - const bidResponses = []; - - // Keys in common bid response are not used; - // Necessary to get around with prebid's common bid response check - const commonBidResponse = { - requestId: request.bidRequest.bidId, - cpm: 0.01, - width: 100, - height: 200, - creativeId: 434, - dealId: 42, - currency: 'USD', - netRevenue: true, - ttl: 360 - }; - - shallowMerge(commonBidResponse, getPageLevelKeywords(iasResponse)); - commonBidResponse.slots = iasResponse.slots; - bidResponses.push(commonBidResponse); - - otherBidIds.forEach(function (bidId) { - var otherResponse = Object.assign({}, commonBidResponse); - otherResponse.requestId = bidId; - bidResponses.push(otherResponse); - }); - - return bidResponses; -} - -export const spec = { - code: BIDDER_CODE, - aliases: [], - isBidRequestValid: isBidRequestValid, - buildRequests: buildRequests, - interpretResponse: interpretResponse -}; - -registerBidder(spec); From a3023ffea39a31eea8bfbf0873101591bf0307be Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Mon, 19 Apr 2021 15:32:05 -0400 Subject: [PATCH 13/23] Add files via upload --- modules/iasBidAdapter.js | 134 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 modules/iasBidAdapter.js diff --git a/modules/iasBidAdapter.js b/modules/iasBidAdapter.js new file mode 100644 index 00000000000..733c123e769 --- /dev/null +++ b/modules/iasBidAdapter.js @@ -0,0 +1,134 @@ +import * as utils from '../src/utils.js'; +import { registerBidder } from '../src/adapters/bidderFactory.js'; + +const BIDDER_CODE = 'ias'; + +const otherBidIds = []; + +function isBidRequestValid(bid) { + const { pubId, adUnitPath } = bid.params; + return !!(pubId && adUnitPath); +} + +/** + * Converts GPT-style size array into a string + * @param {Array} sizes: list of GPT-style sizes, e.g. [[300, 250], [300, 300]] + * @return {String} a string containing sizes, e.g. '[300.250,300.300]' + */ +function stringifySlotSizes(sizes) { + let result = ''; + if (utils.isArray(sizes)) { + result = sizes.reduce((acc, size) => { + acc.push(size.join('.')); + return acc; + }, []); + result = '[' + result.join(',') + ']'; + } + return result; +} + +function stringifySlot(bidRequest) { + const id = bidRequest.adUnitCode; + const ss = stringifySlotSizes(bidRequest.sizes); + const p = bidRequest.params.adUnitPath; + const slot = { id, ss, p }; + const keyValues = utils.getKeys(slot).map(function(key) { + return [key, slot[key]].join(':'); + }); + return '{' + keyValues.join(',') + '}'; +} + +function stringifyWindowSize() { + return [ window.innerWidth || -1, window.innerHeight || -1 ].join('.'); +} + +function stringifyScreenSize() { + return [ (window.screen && window.screen.width) || -1, (window.screen && window.screen.height) || -1 ].join('.'); +} + +function buildRequests(bidRequests) { + const IAS_HOST = 'https://pixel.adsafeprotected.com/services/pub'; + const anId = bidRequests[0].params.pubId; + + let queries = []; + queries.push(['anId', anId]); + queries = queries.concat(bidRequests.reduce(function(acc, request) { + acc.push(['slot', stringifySlot(request)]); + return acc; + }, [])); + + queries.push(['wr', stringifyWindowSize()]); + queries.push(['sr', stringifyScreenSize()]); + queries.push(['url', encodeURIComponent(window.location.href)]); + + const queryString = encodeURI(queries.map(qs => qs.join('=')).join('&')); + + bidRequests.forEach(function (request) { + if (bidRequests[0].bidId != request.bidId) { + otherBidIds.push(request.bidId); + } + }); + + return { + method: 'GET', + url: IAS_HOST, + data: queryString, + bidRequest: bidRequests[0] + }; +} + +function getPageLevelKeywords(response) { + let result = {}; + shallowMerge(result, response.brandSafety); + result.fr = response.fr; + result.custom = response.custom; + return result; +} + +function shallowMerge(dest, src) { + utils.getKeys(src).reduce((dest, srcKey) => { + dest[srcKey] = src[srcKey]; + return dest; + }, dest); +} + +function interpretResponse(serverResponse, request) { + const iasResponse = serverResponse.body; + const bidResponses = []; + + // Keys in common bid response are not used; + // Necessary to get around with prebid's common bid response check + const commonBidResponse = { + requestId: request.bidRequest.bidId, + cpm: 0.01, + width: 100, + height: 200, + creativeId: 434, + dealId: 42, + currency: 'USD', + netRevenue: true, + ttl: 360 + }; + + shallowMerge(commonBidResponse, getPageLevelKeywords(iasResponse)); + commonBidResponse.slots = iasResponse.slots; + bidResponses.push(commonBidResponse); + + otherBidIds.forEach(function (bidId) { + var otherResponse = Object.assign({}, commonBidResponse); + otherResponse.requestId = bidId; + bidResponses.push(otherResponse); + }); + + return bidResponses; +} + +export const spec = { + code: BIDDER_CODE, + aliases: [], + isBidRequestValid: isBidRequestValid, + buildRequests: buildRequests, + interpretResponse: interpretResponse +}; + +registerBidder(spec); From 6971384856dc9bead48df1acb7d2f600384f8bfb Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Tue, 27 Apr 2021 00:08:46 -0400 Subject: [PATCH 14/23] Update openxBidAdapter.js --- modules/openxBidAdapter.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/openxBidAdapter.js b/modules/openxBidAdapter.js index 460a721cb8b..8a61bc869f9 100644 --- a/modules/openxBidAdapter.js +++ b/modules/openxBidAdapter.js @@ -158,6 +158,12 @@ function createBannerBidResponses(oxResponseObj, {bids, startTime}) { bidResponse.meta.brandId = adUnit.brand_id; } + if (adUnit.adomain && length(adUnit.adomain) > 0 ) { + bidResponse.meta.advertiserDomains = adUnit.adomain; + } else { + bidResponse.meta.advertiserDomains = []; + } + if (adUnit.adv_id) { bidResponse.meta.dspid = adUnit.adv_id; } From 7b3b30612a0d1d29cef25b86e19a525b38a61cab Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Tue, 27 Apr 2021 00:45:09 -0400 Subject: [PATCH 15/23] Update openxBidAdapter.js --- modules/openxBidAdapter.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/openxBidAdapter.js b/modules/openxBidAdapter.js index 8a61bc869f9..460a721cb8b 100644 --- a/modules/openxBidAdapter.js +++ b/modules/openxBidAdapter.js @@ -158,12 +158,6 @@ function createBannerBidResponses(oxResponseObj, {bids, startTime}) { bidResponse.meta.brandId = adUnit.brand_id; } - if (adUnit.adomain && length(adUnit.adomain) > 0 ) { - bidResponse.meta.advertiserDomains = adUnit.adomain; - } else { - bidResponse.meta.advertiserDomains = []; - } - if (adUnit.adv_id) { bidResponse.meta.dspid = adUnit.adv_id; } From a023cd8a50cd719ce541efd116d113053f12d648 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 13 May 2021 13:52:53 -0400 Subject: [PATCH 16/23] Update sovrnBidAdapter.js --- modules/sovrnBidAdapter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/sovrnBidAdapter.js b/modules/sovrnBidAdapter.js index 708cb110dbd..cba90e7d434 100644 --- a/modules/sovrnBidAdapter.js +++ b/modules/sovrnBidAdapter.js @@ -160,7 +160,8 @@ export const spec = { netRevenue: true, mediaType: BANNER, ad: decodeURIComponent(`${sovrnBid.adm}`), - ttl: sovrnBid.ext ? (sovrnBid.ext.ttl || 90) : 90 + ttl: sovrnBid.ext ? (sovrnBid.ext.ttl || 90) : 90, + meta: { advertiserDomains: sovrnBid && sovrnBid.adomain ? sovrnBid.adomain : [] } }); }); } From c70fc8b1e9953837947d2bd36b6fdfcbddd8ff87 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 13 May 2021 13:55:24 -0400 Subject: [PATCH 17/23] Update sharethroughBidAdapter.js --- modules/sharethroughBidAdapter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/sharethroughBidAdapter.js b/modules/sharethroughBidAdapter.js index eef18288b17..68ccde0da46 100644 --- a/modules/sharethroughBidAdapter.js +++ b/modules/sharethroughBidAdapter.js @@ -109,6 +109,7 @@ export const sharethroughAdapterSpec = { currency: 'USD', netRevenue: true, ttl: 360, + meta: { advertiserDomains: creative.creative && creative.creative.adomain ? creative.creative.adomain : [] }, ad: generateAd(body, req) }]; }, From d16194bbfded9e4c6fec543b1ffc7d6f1cc50522 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 13 May 2021 13:59:12 -0400 Subject: [PATCH 18/23] Update sharethroughBidAdapter_spec.js --- test/spec/modules/sharethroughBidAdapter_spec.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/spec/modules/sharethroughBidAdapter_spec.js b/test/spec/modules/sharethroughBidAdapter_spec.js index f741f985f9f..02f456f926f 100644 --- a/test/spec/modules/sharethroughBidAdapter_spec.js +++ b/test/spec/modules/sharethroughBidAdapter_spec.js @@ -524,7 +524,10 @@ describe('sharethrough adapter spec', function() { dealId: 'aDealId', currency: 'USD', netRevenue: true, - ttl: 360 + ttl: 360, + meta: { + advertiserDomains: [] + }, }); }); @@ -538,7 +541,10 @@ describe('sharethrough adapter spec', function() { dealId: 'aDealId', currency: 'USD', netRevenue: true, - ttl: 360 + ttl: 360, + meta: { + advertiserDomains: [] + }, }); }); From df40924980393ea196a2012234b5f0db9c0e8da9 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 14 May 2021 11:29:54 -0400 Subject: [PATCH 19/23] Update sovrnBidAdapter_spec.js --- test/spec/modules/sovrnBidAdapter_spec.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/spec/modules/sovrnBidAdapter_spec.js b/test/spec/modules/sovrnBidAdapter_spec.js index 1050fdf4856..1c5fafdb630 100644 --- a/test/spec/modules/sovrnBidAdapter_spec.js +++ b/test/spec/modules/sovrnBidAdapter_spec.js @@ -387,7 +387,8 @@ describe('sovrnBidAdapter', function() { 'netRevenue': true, 'mediaType': 'banner', 'ad': decodeURIComponent(`>`), - 'ttl': 60000 + 'ttl': 60000, + 'meta': advertiserDomains: [] }]; let result = spec.interpretResponse(response); @@ -407,7 +408,8 @@ describe('sovrnBidAdapter', function() { 'netRevenue': true, 'mediaType': 'banner', 'ad': decodeURIComponent(``), - 'ttl': 90 + 'ttl': 90, + 'meta': advertiserDomains: [] }]; let result = spec.interpretResponse(response); @@ -428,7 +430,8 @@ describe('sovrnBidAdapter', function() { 'netRevenue': true, 'mediaType': 'banner', 'ad': decodeURIComponent(``), - 'ttl': 90 + 'ttl': 90, + 'meta': advertiserDomains: [] }]; let result = spec.interpretResponse(response); @@ -449,7 +452,8 @@ describe('sovrnBidAdapter', function() { 'netRevenue': true, 'mediaType': 'banner', 'ad': decodeURIComponent(``), - 'ttl': 480 + 'ttl': 480, + 'meta': advertiserDomains: [] }]; let result = spec.interpretResponse(response); From 659bf31d767a71131f7040af8bf4e38feeaa8d95 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 14 May 2021 11:34:17 -0400 Subject: [PATCH 20/23] Update sovrnBidAdapter_spec.js --- test/spec/modules/sovrnBidAdapter_spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/spec/modules/sovrnBidAdapter_spec.js b/test/spec/modules/sovrnBidAdapter_spec.js index 1c5fafdb630..729c48c28f4 100644 --- a/test/spec/modules/sovrnBidAdapter_spec.js +++ b/test/spec/modules/sovrnBidAdapter_spec.js @@ -388,7 +388,7 @@ describe('sovrnBidAdapter', function() { 'mediaType': 'banner', 'ad': decodeURIComponent(`>`), 'ttl': 60000, - 'meta': advertiserDomains: [] + 'meta': { advertiserDomains: [] } }]; let result = spec.interpretResponse(response); @@ -409,7 +409,7 @@ describe('sovrnBidAdapter', function() { 'mediaType': 'banner', 'ad': decodeURIComponent(``), 'ttl': 90, - 'meta': advertiserDomains: [] + 'meta': { advertiserDomains: [] } }]; let result = spec.interpretResponse(response); @@ -431,7 +431,7 @@ describe('sovrnBidAdapter', function() { 'mediaType': 'banner', 'ad': decodeURIComponent(``), 'ttl': 90, - 'meta': advertiserDomains: [] + 'meta': { advertiserDomains: [] } }]; let result = spec.interpretResponse(response); @@ -453,7 +453,7 @@ describe('sovrnBidAdapter', function() { 'mediaType': 'banner', 'ad': decodeURIComponent(``), 'ttl': 480, - 'meta': advertiserDomains: [] + 'meta': { advertiserDomains: [] } }]; let result = spec.interpretResponse(response); From 5c251c618fb17039a9d48da703a0f202d545449d Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 14 May 2021 11:40:55 -0400 Subject: [PATCH 21/23] Update sharethroughBidAdapter_spec.js --- test/spec/modules/sharethroughBidAdapter_spec.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/spec/modules/sharethroughBidAdapter_spec.js b/test/spec/modules/sharethroughBidAdapter_spec.js index 02f456f926f..f741f985f9f 100644 --- a/test/spec/modules/sharethroughBidAdapter_spec.js +++ b/test/spec/modules/sharethroughBidAdapter_spec.js @@ -524,10 +524,7 @@ describe('sharethrough adapter spec', function() { dealId: 'aDealId', currency: 'USD', netRevenue: true, - ttl: 360, - meta: { - advertiserDomains: [] - }, + ttl: 360 }); }); @@ -541,10 +538,7 @@ describe('sharethrough adapter spec', function() { dealId: 'aDealId', currency: 'USD', netRevenue: true, - ttl: 360, - meta: { - advertiserDomains: [] - }, + ttl: 360 }); }); From 7c9a66ecf91d66f797dee75c1d8c4befe9fff7e5 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 14 May 2021 11:44:57 -0400 Subject: [PATCH 22/23] Update sharethroughBidAdapter_spec.js --- test/spec/modules/sharethroughBidAdapter_spec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/spec/modules/sharethroughBidAdapter_spec.js b/test/spec/modules/sharethroughBidAdapter_spec.js index f741f985f9f..8899b586a30 100644 --- a/test/spec/modules/sharethroughBidAdapter_spec.js +++ b/test/spec/modules/sharethroughBidAdapter_spec.js @@ -486,6 +486,10 @@ describe('sharethrough adapter spec', function() { }); }); + it('handles adomain when missing', function() { + expect(spec.interpretResponse(bidderResponse, prebidRequests[0])[0].meta).to.deep.equal(advertiserDomains: []); + }); + it('returns a correctly parsed out response with largest size when strData.skipIframeBusting is true', function() { expect(spec.interpretResponse(bidderResponse, prebidRequests[1])[0]).to.include( { From d807609a78e832aa16d4925c3ccd6f90afdc6fd4 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 14 May 2021 12:01:59 -0400 Subject: [PATCH 23/23] Update sharethroughBidAdapter_spec.js --- test/spec/modules/sharethroughBidAdapter_spec.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/spec/modules/sharethroughBidAdapter_spec.js b/test/spec/modules/sharethroughBidAdapter_spec.js index 8899b586a30..5c8e01536dd 100644 --- a/test/spec/modules/sharethroughBidAdapter_spec.js +++ b/test/spec/modules/sharethroughBidAdapter_spec.js @@ -473,7 +473,7 @@ describe('sharethrough adapter spec', function() { describe('.interpretResponse', function() { it('returns a correctly parsed out response', function() { - expect(spec.interpretResponse(bidderResponse, prebidRequests[0])[0]).to.include( + expect(spec.interpretResponse(bidderResponse, prebidRequests[0])[0]).to.deep.include( { width: 1, height: 1, @@ -482,14 +482,11 @@ describe('sharethrough adapter spec', function() { dealId: 'aDealId', currency: 'USD', netRevenue: true, - ttl: 360 + ttl: 360, + meta: { advertiserDomains: [] } }); }); - it('handles adomain when missing', function() { - expect(spec.interpretResponse(bidderResponse, prebidRequests[0])[0].meta).to.deep.equal(advertiserDomains: []); - }); - it('returns a correctly parsed out response with largest size when strData.skipIframeBusting is true', function() { expect(spec.interpretResponse(bidderResponse, prebidRequests[1])[0]).to.include( {