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.
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 web server, in Google SearchConsole and robots.txt