Not sure if anyone has said this, but why not simply set a cookie, then pull it in where you will need it. That way you can detect the referrer regardless of the route taken around the site. Or have I missed something ?
EDIT: Ahh yes, session cookies mentioned above! Seems the best way as far as I can see.
Spooky
|