Set a rule on 2 specific pages only
Hi everyone,
I've been stuck trying to set a rule to fire on specific pages. I've tried by cc, value comparison, JS variable (and other ways). This is using Medallia Digital Experience Analytics extension. The event is set up as:
Events - Data Layer Manager Extension: pageLoad
Conditions:
Logic Type: Regular
Extension: Core
Condition Type: Custom Code
let pagePath = _satellite.getVar('Page | Path');
if (pagePath === '/ca/en/page-1' ||
pagePath === '/ca/en/page-2/x/page2-child' ||
return true;
} else {
return false;
}
Actions
Extension: Medallia Digital Experience Analytics
Action Type: Tracking Code
The data element is set up like:
let PageName = _satellite.getVar('Page | Name').replace('/#/', '/');
let host = _satellite.getVar('Site | Server');
let pagePath = PageName.replace(host, '').replace('/', '').replace('/#/', '/');
The tag fires on all other pages too - I'm not exactly sure why since what is set up right now should isolate it. Does anyone have any ideas?