diff --git a/libraries/intentIqConstants/intentIqConstants.js b/libraries/intentIqConstants/intentIqConstants.js index bfa8ae48d82..42760284524 100644 --- a/libraries/intentIqConstants/intentIqConstants.js +++ b/libraries/intentIqConstants/intentIqConstants.js @@ -8,7 +8,7 @@ export const DEFAULT_PERCENTAGE = 95; export const CLIENT_HINTS_KEY = "_iiq_ch"; export const EMPTY = "EMPTY"; export const GVLID = "1323"; -export const VERSION = 0.37; +export const VERSION = 0.371; export const PREBID = "pbjs"; export const HOURS_24 = 86400000; export const HOURS_72 = HOURS_24 * 3; diff --git a/modules/intentIqIdSystem.js b/modules/intentIqIdSystem.js index 7fa11b72656..dc1de9b8720 100644 --- a/modules/intentIqIdSystem.js +++ b/modules/intentIqIdSystem.js @@ -356,13 +356,18 @@ export const intentIqIdSubmodule = { const cmpData = getCmpData(); const gdprDetected = cmpData.gdprString; firstPartyData = tryParse(readData(FIRST_PARTY_KEY_FINAL, allowedStorage)); - actualABGroup = defineABTestingGroup(configParams, partnerData?.terminationCause); - if (groupChanged) groupChanged(actualABGroup, partnerData?.terminationCause); const currentBrowserLowerCase = detectBrowser(); const browserBlackList = typeof configParams.browserBlackList === 'string' ? configParams.browserBlackList.toLowerCase() : ''; const isBlacklisted = browserBlackList?.includes(currentBrowserLowerCase); let newUser = false; + if (!isBlacklisted) { + actualABGroup = defineABTestingGroup(configParams, partnerData?.terminationCause); + if (groupChanged) groupChanged(actualABGroup, partnerData?.terminationCause); + } else { + actualABGroup = undefined; + } + setGamReporting(gamObjectReference, gamParameterName, actualABGroup, isBlacklisted); callbackTimeoutID = setTimeout(() => { diff --git a/test/spec/modules/intentIqIdSystem_spec.js b/test/spec/modules/intentIqIdSystem_spec.js index 279fd9cc5bb..e7a957b6dfc 100644 --- a/test/spec/modules/intentIqIdSystem_spec.js +++ b/test/spec/modules/intentIqIdSystem_spec.js @@ -2029,6 +2029,42 @@ describe('IntentIQ tests', function () { expect(groupChangedSpy.calledWith(usedGroup)).to.be.true; }); + it('should NOT call groupChanged when the current browser is blacklisted', async function () { + const groupChangedSpy = sinon.spy(); + const blk = detectBrowser(); + const configParams = { + params: { + ...defaultConfigParams.params, + browserBlackList: blk, + groupChanged: groupChangedSpy + } + }; + + intentIqIdSubmodule.getId(configParams); + await waitForClientHints(); + + expect(groupChangedSpy.called).to.be.false; + }); + + it('should not mark a test group on the sync pixel when the current browser is blacklisted', async function () { + const blk = detectBrowser(); + const configParams = { + params: { + ...defaultConfigParams.params, + browserBlackList: blk + } + }; + + intentIqIdSubmodule.getId(configParams); + await waitForClientHints(); + + const pixelRequest = server.requests[0]; + expect(pixelRequest).to.exist; + expect(pixelRequest.url).to.include('at=20'); + expect(pixelRequest.url).to.not.include('testGroup='); + expect(pixelRequest.url).to.include('isInTestGroup=false'); + }); + it('should include testPercentage with configured abPercentage in AT=39 URL', async function () { const callBackSpy = sinon.spy(); const configParams = {