diff --git a/_src-lp/scripts/scripts.js b/_src-lp/scripts/scripts.js index fd2a63a7..df3fc93e 100644 --- a/_src-lp/scripts/scripts.js +++ b/_src-lp/scripts/scripts.js @@ -1029,7 +1029,7 @@ async function initVlaicuProductPriceLogic(campaign) { async function initializeProductsPriceLogic() { let pid = getParam('pid'); let campaign = getParam('campaign'); - const vlaicuCampaign = getParam('vcampaign'); + const vlaicuCampaign = getParam('vcampaign') || getMetadata('vcampaign'); try { const visitor = Visitor.getInstance('0E920C0F53DA9E9B0A490D45@AdobeOrg'); @@ -1179,6 +1179,12 @@ async function loadPage() { }); } + // in the drafts folder adobe target is not loaded, so the price logic should be executed + const isPageNotInDraftsFolder = window.location.pathname.indexOf('/drafts/') === -1; + if (!isPageNotInDraftsFolder) { + initializeProductsPriceLogic(); + } + addScript('/_src-lp/scripts/vendor/bootstrap/bootstrap.bundle.min.js', {}, 'defer'); eventOnDropdownSlider(); diff --git a/_src-lp/scripts/vendor/product.js b/_src-lp/scripts/vendor/product.js index b88d4d4b..7102f129 100644 --- a/_src-lp/scripts/vendor/product.js +++ b/_src-lp/scripts/vendor/product.js @@ -419,7 +419,7 @@ export class DecorateLink { const isAdobeMcAlreadyAdded = link.includes('adobe_mc'); if (isAdobeMcAlreadyAdded) { - return; + return link.replace(/MCAID%3D.*%7CMCORGID/, 'MCAID%3D%7CMCORGID'); } const destinationURLWithVisitorIDs = visitor.appendVisitorIDsTo(link);