Skip to content

Commit

Permalink
fix no cookie preference in stage (#3309)
Browse files Browse the repository at this point in the history
  • Loading branch information
swamu authored Dec 5, 2024
1 parent 11b61cc commit ff58d7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libs/martech/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,10 @@ function updateAMCVCookie(ECID) {
*/
export const loadAnalyticsAndInteractionData = async ({ locale, env, calculatedTimeout }) => {
const value = getCookie('kndctr_9E1005A551ED61CA0A490D45_AdobeOrg_consent', true);
if (value?.[1] === 'general' && value?.[2] === 'out') {
const isRejectedDecodedURI = value?.[2] === undefined && decodeURIComponent(value?.[1]) === 'general=out';
const isRejectedURI = value?.[1] === 'general' && value?.[2] === 'out';

if (isRejectedDecodedURI || isRejectedURI) {
return Promise.reject(new Error('Consent Cookie doesnt allow interact'));
}

Expand Down

0 comments on commit ff58d7e

Please sign in to comment.