Can I run onClick first. This code does not seem to work unless onClick needs window.location inside it?
<a onclick="click.php?add=yes&goto=http://refererurl.com/" href="http://refererurl.com/">advert</a>
Here it works a bit like Google where the user and search engine thinks the link is http://refererurl.com/ - however, the user is take to the click.php file first and then redirect.