Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > tracking visitors using asp question

Reply
Thread Tools

tracking visitors using asp question

 
 
Burton Figg
Guest
Posts: n/a
 
      10-26-2003
I have set up a very simple site tracker.

Each page runs the following code, to insert basic details into a MySQL
database.

ref = request.servervariables("HTTP_REFERER")
str = request.servervariables("SCRIPT_NAME") & "?" &
request.servervariables("QUERY_STRING")
ip = request.servervariables("REMOTE_ADDR")
agt = request.servervariables("HTTP_USER_AGENT")
sql = "INSERT INTO _tracker (fldurl, fldref, fldip, fldagent, flddate)
VALUES ('"&str&"','"&ref&"','"&ip&"','"&agt&"',now())"
set iRS = oConn.Execute(sql)
set iRS = nothing

I was using the IP address as the unique field here, so that I could run off
a list of pages each person visits.

However the problem is that I can look at any number of IP addresses and see
that they visited the site at say, 11am, 3pm and 7pm.

It could be the case that the same person is coming back 3 times, but also
it is likely that with ISPs having a pool of IP addresses, that the IP
address I am looking at has been used by 3 people.

Do people know if there is another piece of info I could use to separate out
the 3 IP addresses, in order to differentiate them? I'm also adding in to
the databse the HTTP_USER_AGENT but this won't be foolproof as a way to
split the same IP address up into possibly 3 different users as a lot of
people have the same browsers / OS.

Some site trackers are able to list the domain a person is visiting from -
am I able to get this information using ASP?

I have had a good trawl through the standard server variables list - where
you loop through to see all the variables using 'for each sv in
request.servervariables' but have not found anything of much use other than
those I listed above.

Thanks

Jim
============
www.jimpix.co.uk


 
Reply With Quote
 
 
 
 
Phillip Windell
Guest
Posts: n/a
 
      10-27-2003

"Burton Figg" <(E-Mail Removed)> wrote in message
news:bnh02n$pj9$(E-Mail Removed)...
> However the problem is that I can look at any number of IP addresses

and see
> that they visited the site at say, 11am, 3pm and 7pm.
>
> It could be the case that the same person is coming back 3 times,


Yes.

> but also it is likely that with ISPs having a pool of IP addresses,

that the IP
> address I am looking at has been used by 3 people.


Also, Yes. By using DHCP that same address could circulate through
any one of the ISP's customer each time disconnects from the internet
and another connects. Also many "home user" DSL systems use DHCP
(with PPPoE) and create the same effect. Even some business DSL
connections use that.

You could also have a 1000's of user's appear under the same IP
address if they are behind a proxy server of a NAT based firewall.

There is no dependable way to do what you wish. HTTP is "stateless",
there is no constant connection maintained between the user and the
server, therefore there is nothing to monitor. Even sites that seem
"stateful" really aren't. Using Cookies, Session Variables, Databases,
etc., are ways to "emulate" a statefull connection by re-identifing a
user the next time they grap a new page, but they all have weaknesses
and they only create the "illusion" of being statefull, when in fact a
statefull connection still does not and has never existed.

--

Phillip Windell [CCNA, MVP, MCP]
http://www.velocityreviews.com/forums/(E-Mail Removed)
WAND-TV (ABC Affiliate)
www.wandtv.com


 
Reply With Quote
 
 
 
 
Phillip Windell
Guest
Posts: n/a
 
      10-27-2003

"Phillip Windell" <pwindell{at}wandtv*d0t*com> wrote in message
news:(E-Mail Removed)...

>.....proxy server of a NAT based firewall.


I meant OR not OF.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
tracking unique visitors Christine Genzer HTML 0 12-11-2007 09:04 PM
TorrentSpy ordered to start tracking visitors jack NZ Computing 2 06-10-2007 05:17 AM
more unique visitors than visitors meltedown HTML 9 10-17-2006 09:43 AM
Tracking logged in users and visitors gil ASP General 0 11-12-2004 04:06 AM
Tracking visitors to pages Emmett Power ASP General 2 04-30-2004 06:59 PM



Advertisments