Thank you Jon, for pursuing this further and under the same generous terms. :-) ...I can also see why it's important for you to resolve this thoroughly...
I'm not technical enough but have heard that redirection is tricky business in Wordpress, as you said. Makes me wonder... if a cookie + javascript solution is better?... not that I know much about both of them... but it seems like we don't actually need to touch the URLs from the Wodpress side... maybe just from the browser side via javascript will be enough?
Some hints below...
Check domain name of a hyperlink:
- http://stackoverflow.com/questions/4610412/determine-domain-name-in-javascript
- http://scratch99.com/web-development/javascript/how-to-get-the-domain-from-a-url/
... and if domain of a link is from the same Wordpress site, append URL parameter on clicking that link:
- http://stackoverflow.com/questions/486896/adding-a-parameter-to-the-url-with-javascript
- http://stackoverflow.com/questions/13063838/add-change-parameter-of-url-and-redirect-to-the-new-url
But over to you to do more thinking and testing. Many thanks!