Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic User Information (tracking)

Status
Not open for further replies.

gi11ies

Programmer
Mar 26, 2002
52
0
0
Hi

I have added some tracking onto the home page of my web site, just so that I get very basic information (IP, time, browser, version, aol or not, platform) and I'm wondering if there is a way in which I can get the refferer page ... or the page that the visitor was on before visiting my site ... the code I use so far is ...

Dim strConnection7 As OleDbConnection
Dim strConnString7 As String
strConnString7 = ConfigurationSettings.AppSettings("connString")
strConnection7 = New OleDbConnection(strConnString7)
strConnection7.Open
Dim strSQL7 as String = "INSERT INTO hits (hit_ip, hit_btype, hit_bversion, hit_aol, hit_platform) VALUES ('" & Request.userhostaddress & "','" & Request.browser.browser & "','" & Request.browser.version & "','" & Request.browser.AOL & "','" & Request.browser.platform & "')"
Dim strCmd7 as New OleDbCommand(strSQL7,strConnection7)
strCmd7.ExecuteNonQuery()
strConnection7.Close

I'd also like to be able to get the screen resolution .... but am unsure on this also.

Any help on how to do this, or links would be great...

Gillies
 
If you add trace=true to your page tag e.g.
Code:
<%@ Page Language="vb" trace="true"%>
Then you will see a lot of useful info that you can get (one of which is HTTP_REFERER which quite obviously gives you the referring page).

For the screen resolution, you can use screen.height and screen.width in javascript to get these details. e.g.



--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Thanks, using the referrer worked great !!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top