Rank: Newbie Groups: Member
Joined: 5/20/2011 Posts: 2 Points: 6
|
The sponsors of my website have a need to identify the referring URL of a user and tag any record they create with a code.
For example, if someone searched for us on Google and then clicked a link to go through to our website, the referring URL should contain "www.google.com".
Our initial thoughts are to use "HttpContext.Current.Request.UrlReferrer" but every time we perform some testing, this value is initially null and then the code gets re-run after performing the URL re-writing process and "HttpContext.Current.Request.UrlReferrer" becomes populated with the URL of the page.
Please can some advise on whether this has been done before and what best approach would be.
|
Rank: Newbie Groups: Member
Joined: 5/20/2011 Posts: 2 Points: 6
|
Used Request.ServerVariables["HTTP_REFERER"]; and this worked.
|
Rank: Newbie Groups: Member
Joined: 10/26/2011 Posts: 1 Points: 3
|
I also want to ask a similar thing, and one to answer correctly will help a lot to me.
|
Rank: Newbie Groups: Member
Joined: 3/24/2012 Posts: 1 Points: 3
|
expert123 wrote:I also want to ask a similar thing, and one to answer correctly will help a lot to me. Yes that's my question to pose. If the answers will help us a lot. Vietnam Airlines - Vietnam Railways - Vietnam Tours
|