What usually works is, instead of using the ref code directly, write a script that accepts a parameter and based on that, redirects to the sponsor
Most of the time people will be too lazy to close the page and re-enter the URL.
But for myself, I usually use ref code of friends, people that I like, or if its something that I wouldn't have stumbled upon by myself