From f21f28f32a77ae14f08ed1948a10326e739db9bf Mon Sep 17 00:00:00 2001 From: Scott Menzer Date: Wed, 24 Mar 2021 16:23:48 +0100 Subject: [PATCH] differentiate the IDs provided by ID5 when the user is opted out vs the user is in the control group of A/B testing --- modules/id5IdSystem.js | 3 ++- test/spec/modules/id5IdSystem_spec.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/id5IdSystem.js b/modules/id5IdSystem.js index 6dade7d01f0..201fa6ce812 100644 --- a/modules/id5IdSystem.js +++ b/modules/id5IdSystem.js @@ -67,7 +67,8 @@ export const id5IdSubmodule = { } else if (abConfig.enabled === true && controlGroup === true) { // A/B Testing is enabled and user is in the Control Group, so do not share the ID5 ID utils.logInfo('User ID - ID5 submodule: A/B Testing Enabled - user is in the Control Group, so the ID5 ID is NOT exposed'); - universalUid = linkType = 0; + universalUid = ''; + linkType = 0; } else if (abConfig.enabled === true) { // A/B Testing is enabled but user is not in the Control Group, so ID5 ID is shared utils.logInfo('User ID - ID5 submodule: A/B Testing Enabled - user is NOT in the Control Group, so the ID5 ID is exposed'); diff --git a/test/spec/modules/id5IdSystem_spec.js b/test/spec/modules/id5IdSystem_spec.js index 7f104ff403d..aa09454d978 100644 --- a/test/spec/modules/id5IdSystem_spec.js +++ b/test/spec/modules/id5IdSystem_spec.js @@ -449,7 +449,7 @@ describe('ID5 ID System', function() { describe('A/B Testing', function() { const expectedDecodedObjectWithIdAbOff = { id5id: { uid: ID5_STORED_ID, ext: { linkType: ID5_STORED_LINK_TYPE } } }; const expectedDecodedObjectWithIdAbOn = { id5id: { uid: ID5_STORED_ID, ext: { linkType: ID5_STORED_LINK_TYPE, abTestingControlGroup: false } } }; - const expectedDecodedObjectWithoutIdAbOn = { id5id: { uid: 0, ext: { linkType: 0, abTestingControlGroup: true } } }; + const expectedDecodedObjectWithoutIdAbOn = { id5id: { uid: '', ext: { linkType: 0, abTestingControlGroup: true } } }; let testConfig; beforeEach(function() {