When users clicks on Yes or No button answering question "Was this article useful?" we send a SitecCatalyst custom link call . I am trying to capture URL into the prop to send it in this request.
Currently this prop is mapped to the Tealium variable sc_page_url_shortcut. I added Set Data Values extension where I set sc_page_url_shortcut to variable URL on condition that article_events equals 'Rating' (see the code below). This didn't work. I still can't see this prop in the request.
How to do it?
Alternatively: the original code is in the JS extension and looks like:
// add to data object for event
var form_event = "";
if (tracker.link === "Yes") {
form_event = "Clicked Yes";
}
tracker.data = {
article_events: "Rating",
form_event: form_event,
};
How to capture URL here? e.g.
sc_page_url_shortcut = window.location.protocol + "//" + window.location.host + "/" + window.location.pathname;
How to do it correctly?
Thanks in advance