Forum Moderators: open

Message Too Old, No Replies

Counting outgoing hits from my site

is it possible using ASP?

         

Googly

3:07 pm on May 2, 2003 (gmt 0)



I would not have a clue about the code, but is it possible that when someone clicks on a link on my website that their use of that link is logged. And if there is a solution would there be a way to ignore the hits created by spiders? Hits from spiders could massively inflate such figures.

Googly

jeremy goodrich

5:23 pm on May 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, if you code a script that does a simple environment variable check, this would be quite easy.

if ($ENV type variable == "spider")
then set location = foobar & don't log it

else if ($ENV type variable =="surfer")

then set location = outbound-link & log it.

That is more or less what I do for some sites, but as I don't code in ASP :) another member might be able to give you an idea what those variables are that you would need.

Also you might try a script archive like Hotscripts or another that offers ASP code. If you do, try searching for 'click tracking' or 'redirect scripts' or something like that.

cheers.

duckhunter

2:46 am on May 4, 2003 (gmt 0)

10+ Year Member



Googly, a few server variables can get you that info.

Request.ServerVariables("URL")
Request.ServerVariables("QUERY_STRING")

URL gives the absolute path down to the scriptname. If you are passing params in a querystring, they're in the other.

Spiders...In my global.asa Session_OnStart I check the Request.ServerVariables("HTTP_USER_AGENT") to exclude a given list of agent names like googlebot, PartnerSite, etc. from this process.