Capture and add URL to the custom click

Gold Contributor
Gold Contributor
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
1 REPLY 1

Capture and add URL to the custom click

Employee Emeritus
Hi Alla, Generally speaking we encourage usage of Tealium extensions and prebuilt data if possible. We have done similar tracking many times for clients before so it's likely we'll need to explore your specific use-case in order to help. Please contact your account manager for further assistance.
Public