diff --git a/modules/.submodules.json b/modules/.submodules.json index 2fb46377a64..1a2fb3c8f27 100644 --- a/modules/.submodules.json +++ b/modules/.submodules.json @@ -26,7 +26,6 @@ "mwOpenLinkIdSystem", "naveggIdSystem", "netIdSystem", - "nextrollIdSystem", "novatiqIdSystem", "parrableIdSystem", "pubProvidedIdSystem", diff --git a/modules/nextrollBidAdapter.js b/modules/nextrollBidAdapter.js index 4e82bc1cbda..da5c0c848bf 100644 --- a/modules/nextrollBidAdapter.js +++ b/modules/nextrollBidAdapter.js @@ -65,7 +65,6 @@ export const spec = { } }, - user: _getUser(validBidRequests), site: _getSite(bidRequest, topLocation), seller: _getSeller(bidRequest), device: _getDevice(bidRequest), @@ -186,22 +185,6 @@ function _getNativeAssets(mediaTypeNative) { .filter(asset => asset !== undefined); } -function _getUser(requests) { - const id = deepAccess(requests, '0.userId.nextrollId'); - if (id === undefined) { - return; - } - - return { - ext: { - eid: [{ - 'source': 'nextroll', - id - }] - } - }; -} - function _getFloor(bidRequest) { if (!isFn(bidRequest.getFloor)) { return (bidRequest.params.bidfloor) ? bidRequest.params.bidfloor : null; diff --git a/modules/nextrollIdSystem.js b/modules/nextrollIdSystem.js deleted file mode 100644 index 5a59e216394..00000000000 --- a/modules/nextrollIdSystem.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This module adds Nextroll ID to the User ID module - * The {@link module:modules/userId} module is required - * @module modules/nextrollIdSystem - * @requires module:modules/userId - */ - -import { deepAccess } from '../src/utils.js'; -import { submodule } from '../src/hook.js'; -import { getStorageManager } from '../src/storageManager.js'; - -const NEXTROLL_ID_LS_KEY = 'dca0.com'; -const KEY_PREFIX = 'AdID:' - -export const storage = getStorageManager(); - -/** @type {Submodule} */ -export const nextrollIdSubmodule = { - /** - * used to link submodule with config - * @type {string} - */ - name: 'nextrollId', - - /** - * decode the stored id value for passing to bid requests - * @function - * @return {{nextrollId: string} | undefined} - */ - decode(value) { - return value; - }, - - /** - * performs action to obtain id and return a value. - * @function - * @param {SubmoduleConfig} [config] - * @returns {{id: {nextrollId: string} | undefined}} - */ - getId(config) { - const key = KEY_PREFIX + deepAccess(config, 'params.partnerId', 'undefined'); - const dataString = storage.getDataFromLocalStorage(NEXTROLL_ID_LS_KEY) || '{}'; - const data = JSON.parse(dataString); - const idValue = deepAccess(data, `${key}.value`); - - return { id: idValue ? {nextrollId: idValue} : undefined }; - } -}; - -submodule('userId', nextrollIdSubmodule); diff --git a/modules/userId/eids.js b/modules/userId/eids.js index e78cffdcbac..0a45f5f7208 100644 --- a/modules/userId/eids.js +++ b/modules/userId/eids.js @@ -179,12 +179,6 @@ const USER_IDS_CONFIG = { atype: 1 }, - // nextroll - 'nextrollId': { - source: 'nextroll.com', - atype: 1 - }, - // IDx 'idx': { source: 'idx.lat', diff --git a/modules/userId/eids.md b/modules/userId/eids.md index 4c516d5441c..10db9d40c72 100644 --- a/modules/userId/eids.md +++ b/modules/userId/eids.md @@ -140,14 +140,6 @@ userIdAsEids = [ }] }, - { - source: 'nextroll.com', - uids: [{ - id: 'some-random-id-value', - atype: 1 - }] - }, - { source: 'audigent.com', uids: [{ diff --git a/modules/userId/userId.md b/modules/userId/userId.md index 44ed7003f0c..1262120270d 100644 --- a/modules/userId/userId.md +++ b/modules/userId/userId.md @@ -225,11 +225,6 @@ pbjs.setConfig({ expires: 90, // Expiration in days refreshInSeconds: 8*3600 // User Id cache lifetime in seconds, defaulting to 'expires' }, - }, { - name: 'nextrollId', - params: { - partnerId: "1009", // Set your real NextRoll partner ID here for production - } }, { name: 'criteo', storage: { // It is best not to specify this parameter since the module needs to be called as many times as possible diff --git a/test/spec/modules/eids_spec.js b/test/spec/modules/eids_spec.js index 9edda3c9e95..f50570a2595 100644 --- a/test/spec/modules/eids_spec.js +++ b/test/spec/modules/eids_spec.js @@ -213,18 +213,6 @@ describe('eids array generation for known sub-modules', function() { }); }); - it('NextRollId', function() { - const userId = { - nextrollId: 'some-random-id-value' - }; - const newEids = createEidsArray(userId); - expect(newEids.length).to.equal(1); - expect(newEids[0]).to.deep.equal({ - source: 'nextroll.com', - uids: [{id: 'some-random-id-value', atype: 1}] - }); - }); - it('zeotapIdPlus', function() { const userId = { IDP: 'some-random-id-value' diff --git a/test/spec/modules/nextrollIdSystem_spec.js b/test/spec/modules/nextrollIdSystem_spec.js deleted file mode 100644 index d89c7fe3c98..00000000000 --- a/test/spec/modules/nextrollIdSystem_spec.js +++ /dev/null @@ -1,56 +0,0 @@ -import { nextrollIdSubmodule, storage } from 'modules/nextrollIdSystem.js'; - -const LS_VALUE = `{ - "AdID":{"id":"adid","key":"AdID"}, - "AdID:1002": {"id":"adid","key":"AdID:1002","value":"id_value"}}`; - -describe('NextrollId module', function () { - let sandbox = sinon.sandbox.create(); - let hasLocalStorageStub; - let getLocalStorageStub; - - beforeEach(function() { - hasLocalStorageStub = sandbox.stub(storage, 'hasLocalStorage'); - getLocalStorageStub = sandbox.stub(storage, 'getDataFromLocalStorage'); - }); - - afterEach(function () { - sandbox.restore(); - }) - - const testCases = [ - { - expect: { - id: {nextrollId: 'id_value'}, - }, - params: {partnerId: '1002'}, - localStorage: LS_VALUE - }, - { - expect: {id: undefined}, - params: {partnerId: '1003'}, - localStorage: LS_VALUE - }, - { - expect: {id: undefined}, - params: {partnerId: ''}, - localStorage: LS_VALUE - }, - { - expect: {id: undefined}, - params: {partnerId: '102'}, - localStorage: undefined - }, - { - expect: {id: undefined}, - params: undefined, - localStorage: undefined - } - ] - testCases.forEach( - (testCase, i) => it(`getId() (TC #${i}) should return the nextroll id if it exists`, function () { - getLocalStorageStub.withArgs('dca0.com').returns(testCase.localStorage); - const id = nextrollIdSubmodule.getId({params: testCase.params}); - expect(id).to.be.deep.equal(testCase.expect); - })) -}); diff --git a/test/spec/modules/userId_spec.js b/test/spec/modules/userId_spec.js index 6bcc1ff58f9..a38f28640e3 100644 --- a/test/spec/modules/userId_spec.js +++ b/test/spec/modules/userId_spec.js @@ -32,7 +32,6 @@ import {dmdIdSubmodule} from 'modules/dmdIdSystem.js'; import {liveIntentIdSubmodule} from 'modules/liveIntentIdSystem.js'; import {merkleIdSubmodule} from 'modules/merkleIdSystem.js'; import {netIdSubmodule} from 'modules/netIdSystem.js'; -import {nextrollIdSubmodule} from 'modules/nextrollIdSystem.js'; import {intentIqIdSubmodule} from 'modules/intentIqIdSystem.js'; import {zeotapIdPlusSubmodule} from 'modules/zeotapIdPlusIdSystem.js'; import {sharedIdSystemSubmodule} from 'modules/sharedIdSystem.js'; @@ -575,7 +574,7 @@ describe('User ID', function () { }); it('handles config with usersync and userIds that are empty objs', function () { - setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, nextrollIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); + setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); init(config); config.setConfig({ userSync: { @@ -586,7 +585,7 @@ describe('User ID', function () { }); it('handles config with usersync and userIds with empty names or that dont match a submodule.name', function () { - setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, nextrollIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); + setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, merkleIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); init(config); config.setConfig({ userSync: { @@ -603,7 +602,7 @@ describe('User ID', function () { }); it('config with 1 configurations should create 1 submodules', function () { - setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, nextrollIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); + setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); init(config); config.setConfig(getConfigMock(['unifiedId', 'unifiedid', 'cookie'])); @@ -624,8 +623,8 @@ describe('User ID', function () { expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 1 submodules'); }); - it('config with 24 configurations should result in 24 submodules add', function () { - setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, liveIntentIdSubmodule, britepoolIdSubmodule, netIdSubmodule, nextrollIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); + it('config with 23 configurations should result in 23 submodules add', function () { + setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, liveIntentIdSubmodule, britepoolIdSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); init(config); config.setConfig({ userSync: { @@ -652,8 +651,6 @@ describe('User ID', function () { }, { name: 'netId', storage: {name: 'netId', type: 'cookie'} - }, { - name: 'nextrollId' }, { name: 'intentIqId', storage: {name: 'intentIqId', type: 'cookie'} @@ -696,11 +693,11 @@ describe('User ID', function () { }] } }); - expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 24 submodules'); + expect(utils.logInfo.args[0][0]).to.exist.and.to.contain('User ID - usersync config updated for 23 submodules'); }); it('config syncDelay updates module correctly', function () { - setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, nextrollIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); + setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); init(config); config.setConfig({ @@ -716,7 +713,7 @@ describe('User ID', function () { }); it('config auctionDelay updates module correctly', function () { - setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, nextrollIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); + setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); init(config); config.setConfig({ userSync: { @@ -731,7 +728,7 @@ describe('User ID', function () { }); it('config auctionDelay defaults to 0 if not a number', function () { - setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, nextrollIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); + setSubmoduleRegistry([sharedIdSystemSubmodule, unifiedIdSubmodule, id5IdSubmodule, identityLinkSubmodule, netIdSubmodule, intentIqIdSubmodule, zeotapIdPlusSubmodule, hadronIdSubmodule, pubProvidedIdSubmodule, criteoIdSubmodule, mwOpenLinkIdSubModule, tapadIdSubmodule, uid2IdSubmodule, admixerIdSubmodule, deepintentDpesSubmodule, dmdIdSubmodule, flocIdSubmodule, akamaiDAPIdSubmodule, amxIdSubmodule, kinessoIdSubmodule, adqueryIdSubmodule]); init(config); config.setConfig({ userSync: {