A JavaScript-free way of doing this might be to use a 301 redirect. Google still passes PR when it's a 301 redirect (I'm not sure whether 302 passes PR), so if you use a 301 redirect from your tracking page, then you'll be fine. And 301 should also preserve referrer information.
Edit:
I want to elaborate on the logic of this method. As Tim noted below, this isn't actually the official use of a 301 redirect, which technically is a way for a web server to indicate that a resource has been permanently moved. Likewise, 302 is technically for indicating when a resource has been temporarily moved to a new location.
However, the 301/302 response codes have a history of being appropriated for other uses by browsers, by search engines and by developers. For example, before 303 existed, it was common to use a 302 redirect to respond to POST requests when you wanted to redirect the user to another page (ie. to prevent a page refresh resubmitting the form). This was technically not what a 302 is supposed to be used for, but due to the lack of alternatives, it was still standard practice to use 302 in this way. Today we have 303, so 302 redirects should no longer be used for this type of redirection, though many applications still do.
Another common nonstandard use of 301/302 redirects is for URL shortening. It's widely recommended for SEO purposes that, if you need to shorten a URL, you use a service that performs a 301 redirect. But technically the content hasn't been moved from the shortened URL to the destination; the shortened URL is just a new alias for it.
Still, when you choose between using JavaScript or 301 redirects for click-tracking, take the following into consideration:
- Google recommends using the JavaScript method, and they're a bit of an authority on web analytics and SEO.
- As Tim mentions, the JavaScript method prevents crawlers from being counted by your click tracker (though you could probably filter crawlers out another way).
- Using the 301 redirection method doesn't conform with the official use of 301 laid out in the HTTP specs.
- On the flip side, you do allow tracking without JavaScript.