On a web app using GAS HtmlService I need to get the url of current page to build a new link within a template.
The web app will run in a Google sites page (GAS as gadget) but also standalone
I am trying "var pageUrl = document.location.href" and then use pageUrl within a Html template like follow. I know it's wrong, but I am lost, Sorry.
<a href="<?= pageUrl + "?item=xyz" ?>" >Item xyz link</a>
Thanks, Fausto