diff --git a/integrationExamples/gpt/idImportLibrary_example.html b/integrationExamples/gpt/idImportLibrary_example.html index b0088131858..a3ef3f168c0 100644 --- a/integrationExamples/gpt/idImportLibrary_example.html +++ b/integrationExamples/gpt/idImportLibrary_example.html @@ -46,8 +46,7 @@ name: 'identityLink', params: { pid: '14', // Set your real identityLink placement ID here - // use3P: false // true/false - If you want to use 3P endpoint to retrieve envelope. If you do not set this property to true, 3p endpoint will not be fired. By default this property is undefined and 3p request will not be fired. - }, + // notUse3P: true // true/false - If you do not want to use 3P endpoint to retrieve envelope. If you do not set this property to true, 3p endpoint will be fired. By default this propertt is undefined and 3p request will be fired.}, storage: { type: 'html5', name: 'idl_env', diff --git a/integrationExamples/gpt/userId_example.html b/integrationExamples/gpt/userId_example.html index 9d170254084..72657258ad5 100644 --- a/integrationExamples/gpt/userId_example.html +++ b/integrationExamples/gpt/userId_example.html @@ -230,7 +230,7 @@ name: 'identityLink', params: { pid: '14', // Set your real identityLink placement ID here - // use3P: false // true/false - If you want to use 3P endpoint to retrieve envelope. If you do not set this property to true, 3p endpoint will not be fired. By default this property is undefined and 3p request will not be fired. + // notUse3P: true // true/false - If you do not want to use 3P endpoint to retrieve envelope. If you do not set this property to true, 3p endpoint will be fired. By default this property is undefined and 3p request will be fired. }, storage: { type: 'cookie', diff --git a/modules/identityLinkIdSystem.js b/modules/identityLinkIdSystem.js index 7c04118e1fc..df7b03b4e6e 100644 --- a/modules/identityLinkIdSystem.js +++ b/modules/identityLinkIdSystem.js @@ -98,7 +98,7 @@ function getEnvelope(url, callback, configParams) { } }; - if (configParams.use3P && !storage.getCookie('_lr_retry_request')) { + if (!configParams.notUse3P && !storage.getCookie('_lr_retry_request')) { setRetryCookie(); utils.logInfo('identityLink: A 3P retrieval is attempted!'); setEnvelopeSource(false); diff --git a/modules/userId/index.js b/modules/userId/index.js index 0dce727ca53..8822e2e11ea 100644 --- a/modules/userId/index.js +++ b/modules/userId/index.js @@ -101,7 +101,7 @@ * @property {(LiveIntentCollectConfig|undefined)} liCollectConfig - the config for LiveIntent's collect requests * @property {(string|undefined)} pd - publisher provided data for reconciling ID5 IDs * @property {(string|undefined)} emailHash - if provided, the hashed email address of a user - * @property {(string|undefined)} use3P - use to retrieve envelope from 3p endpoint + * @property {(string|undefined)} notUse3P - use to retrieve envelope from 3p endpoint */ /** diff --git a/modules/userId/userId.md b/modules/userId/userId.md index d9379ea9c85..79f547b179f 100644 --- a/modules/userId/userId.md +++ b/modules/userId/userId.md @@ -44,7 +44,7 @@ pbjs.setConfig({ name: 'identityLink', params: { pid: '999', // Set your real identityLink placement ID here - // use3P: false // true/false - If you want to use 3P endpoint to retrieve envelope. If you do not set this property to true, 3p endpoint will not be fired. By default this propertt is undefined and 3p request will not be fired. + // notUse3P: true // true/false - If you do not want to use 3P endpoint to retrieve envelope. If you do not set this property to true, 3p endpoint will be fired. By default this property is undefined and 3p request will be fired. }, storage: { type: 'cookie', @@ -146,7 +146,7 @@ pbjs.setConfig({ name: 'identityLink', params: { pid: '999', // Set your real identityLink placement ID here - // use3P: false // true/false - If you want to use 3P endpoint to retrieve envelope. If you do not set this property to true, 3p endpoint will not be fired. By default this property is undefined and 3p request will not be fired. + // notUse3P: true // true/false - If you do not want to use 3P endpoint to retrieve envelope. If you do not set this property to true, 3p endpoint will be fired. By default this property is undefined and 3p request will be fired. }, storage: { type: 'html5', diff --git a/test/spec/modules/identityLinkIdSystem_spec.js b/test/spec/modules/identityLinkIdSystem_spec.js index ac79b2e3916..a31270c86c7 100644 --- a/test/spec/modules/identityLinkIdSystem_spec.js +++ b/test/spec/modules/identityLinkIdSystem_spec.js @@ -36,7 +36,6 @@ describe('IdentityLinkId tests', function () { it('should call the LiveRamp envelope endpoint', function () { let callBackSpy = sinon.spy(); - defaultConfigParams.params.use3P = true; let submoduleCallback = identityLinkSubmodule.getId(defaultConfigParams).callback; submoduleCallback(callBackSpy); let request = server.requests[0]; @@ -65,7 +64,6 @@ describe('IdentityLinkId tests', function () { }); it('should call the LiveRamp envelope endpoint with IAB consent string v1', function () { - defaultConfigParams.params.use3P = true; let callBackSpy = sinon.spy(); let consentData = { gdprApplies: true, @@ -84,7 +82,6 @@ describe('IdentityLinkId tests', function () { }); it('should call the LiveRamp envelope endpoint with IAB consent string v2', function () { - defaultConfigParams.params.use3P = true; let callBackSpy = sinon.spy(); let consentData = { gdprApplies: true, @@ -106,7 +103,6 @@ describe('IdentityLinkId tests', function () { }); it('should not throw Uncaught TypeError when envelope endpoint returns empty response', function () { - defaultConfigParams.params.use3P = true; let callBackSpy = sinon.spy(); let submoduleCallback = identityLinkSubmodule.getId(defaultConfigParams).callback; submoduleCallback(callBackSpy); @@ -123,7 +119,6 @@ describe('IdentityLinkId tests', function () { }); it('should log an error and continue to callback if ajax request errors', function () { - defaultConfigParams.params.use3P = true; let callBackSpy = sinon.spy(); let submoduleCallback = identityLinkSubmodule.getId(defaultConfigParams).callback; submoduleCallback(callBackSpy); @@ -148,8 +143,7 @@ describe('IdentityLinkId tests', function () { expect(request).to.be.eq(undefined); }); - it('should call the LiveRamp envelope endpoint if cookie _lr_retry_request does not exist and use3P config property was set to true', function () { - defaultConfigParams.params.use3P = true; + it('should call the LiveRamp envelope endpoint if cookie _lr_retry_request does not exist and notUse3P config property was not set', function () { let callBackSpy = sinon.spy(); let submoduleCallback = identityLinkSubmodule.getId(defaultConfigParams).callback; submoduleCallback(callBackSpy); @@ -163,16 +157,8 @@ describe('IdentityLinkId tests', function () { expect(callBackSpy.calledOnce).to.be.true; }); - it('should not call the LiveRamp envelope endpoint if config property use3P is set to false', function () { - defaultConfigParams.params.use3P = false; - let callBackSpy = sinon.spy(); - let submoduleCallback = identityLinkSubmodule.getId(defaultConfigParams).callback; - submoduleCallback(callBackSpy); - let request = server.requests[0]; - expect(request).to.be.eq(undefined); - }); - - it('should not call the LiveRamp envelope endpoint if config property use3P is undefined', function () { + it('should not call the LiveRamp envelope endpoint if config property notUse3P is set to true', function () { + defaultConfigParams.params.notUse3P = true; let callBackSpy = sinon.spy(); let submoduleCallback = identityLinkSubmodule.getId(defaultConfigParams).callback; submoduleCallback(callBackSpy);