title: URL Paramters carried between pages - how to stop tel: also?
body: <p>I have this really basic script that changes all the links on my wordpress site to preserve the url param - I use it on wordpress landing pages for my business</p>
  <pre><code>    var queryString = new URL(window.location).search;
  document.querySelectorAll(&quot;[href]&quot;).forEach(link =&gt; {
      var current = link.href;
      link.href = current + queryString;
  });
  </code></pre>
  <p>E.g.</p>
  <pre><code>website.com/?location=Australia
  </code></pre>
  <p>All links on the page will carry over the parameter to whatever href link my visitor clicks</p>
  <pre><code>/book-online/?location=Australia
  
  /request-a-callback/?location=Australia
  </code></pre>
  <p>However this is obviously changing all my href links, and is changing my tel: links with it.</p>
  <p>Is there a way I can make it only change https://?</p>
  <p>My tel: links look like this</p>
  <pre><code>tel:0293 12329?location=Australia
  </code></pre>
  <p>I have had this code copied and pasted for ages, I know absolutely nothing about javascript and no idea where I found the above code, I've just used it for ages and it works as a quick and easy way for me to track a users progress through my landing pages.</p>