title: get current page url
body: <p>On a web app using GAS HtmlService I need to get the url of current page to build a new link within a template.</p>
  
  <p>The web app will run in a Google sites page (GAS as gadget) but also standalone</p>
  
  <p>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.</p>
  
  <pre><code>&lt;a href="&lt;?= pageUrl + "?item=xyz" ?&gt;" &gt;Item xyz link&lt;/a&gt;
  </code></pre>
  
  <p>Thanks, Fausto</p>