Forum Moderators: open

Message Too Old, No Replies

Where did you come from?

Request.ServerVariables("HTTP_REFERER"

         

giggle

8:16 am on Feb 21, 2007 (gmt 0)

10+ Year Member



Hi

I've developed a small bit of code int ASP to capture where our visitors are coming from and update a database with all referral data.

I don't know if it's the way I've written it or not, but, sometimes the referrer comes back as null.

The statement I use to collect the referral is:

<%
.
.
strReferrer = Request.ServerVariables("HTTP_REFERER")
.
.
%>

If this is not a stable way of collecting that information is there an alternative way in ASP to collect the referral?

Thanks

Mick

phranque

8:38 am on Feb 21, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



an unreferred visitor might be using bookmarks, clicking on a link in a non-http-client application(email, im, etc), pasting a url into the browser, etc

giggle

4:20 am on Feb 22, 2007 (gmt 0)

10+ Year Member



Thanks phranque.

I guess it could be but I'm a bit surprised at how many we are receiving. I didn't think that our commercial site would be that popular.

Do you know of any alternative method of capturing the referrer? Javascript or otherwise...

Thanks again

Mick

phranque

5:44 am on Feb 22, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



if it is actually unreferred traffic then you by definition don't have a referrer value.

if the traffic has been referred by an external site you don't have a page loaded in client to help collect referrer information using javascript.

if the problem is a poorly behaved browser you can't count on anything working anyway.

giggle

6:12 am on Feb 22, 2007 (gmt 0)

10+ Year Member



phranque

Yea, can't trust anything it seems.

I noticed that by capturing the browser ("HTTP_USER_AGENT") that some of the blanks were actually bots (GoogleBot, MSNBot etc.) crawling the site so I can identify those blank referrals. The rest are a mystery.

Cheers

Mick

ukwebmaster

5:35 pm on Feb 22, 2007 (gmt 0)

10+ Year Member



I've read that Norton Internet Security strips the http_referrer.