Basically we were trying to concatenate the three values in the page name section through data element. However, we see the previous page is capturing on the page name instead of the current page name. checked the code in the browser console and it is firing fine as expected using 'this.hierarchyString;" at the end of the code. But I get an error on custom code as "expected an assignment or function call and instead saw an expression " when I use "this" instead of "return" at the end of the statement. Therefore, what should I use exactly at the end of the statement to get the value of "hierarchyString" without any error or warning? Please assist me for the same and let me know if any.
Extension - Core
Data Element Type : Custom Code
var hierarchyString = _satellite.getVar('Data Layer - Page Title');