<a rel="nofollow" onlick="myFunction()" href="http://example.ru">site.ru</a>
<script>
function myFunction() {
location.href = "http://example.ru?reflink";
return false;
}
</script>
<span onclick="myFunction()" class="link">site.ru</span>
<script>
function myFunction() {
location.href = "http://example.ru?reflink";
return false;
}
</script>