Skip to content

Commit

Permalink
Merge branch 'main' into DEX-21660
Browse files Browse the repository at this point in the history
  • Loading branch information
abutuza authored Jan 22, 2025
2 parents f1a2e27 + 0b23bb6 commit b35c107
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion _src-lp/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion _src-lp/scripts/vendor/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b35c107

Please sign in to comment.