**This is a good hole for XSS-attack and very bad practice!**

    onclick="location.href=this.href+'?xyz='+val;return false;"

Use click trackers to track mailto and other [non-HTTP calls only][1].

**You can use something like this:**

    <a href="http://example.com" target="_blank" rel="noopener">
        MySite
    </a>

**?xyz=55**

the transfer of the link juice will depend on the processing settings for the "?"-parameter on your server, in search console and robots.txt


  [1]: https://support.google.com/campaignmanager/answer/2834235?hl=en
  [2]: https://support.google.com/campaignmanager/answer/4599566?hl=en