473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Recording Visitor Stats

My web site is built using ASP.NET, the host supporting .NET 3.5, SQL
Server Express and Access.

I want to start collecting some visitor stats, in particular OS and
Browser used, pages visited, length of time on each page, screen size,
browser window size and IP address.

I'm hoping that this session information is available via the .NET
framework. Can someone point me in the right direction please.

Thanks.

--
Spence
Computing Services - because IT needn't be difficult
http://www.compservonline.co.uk/

Sep 16 '08 #1
8 1427
On Sep 17, 12:06*am, Spence <spencelayhathotmaildotcomwrote:
My web site is built using ASP.NET, the host supporting .NET 3.5, SQL
Server Express and Access.

I want to start collecting some visitor stats, in particular OS and
Browser used, pages visited, length of time on each page, screen size,
browser window size and IP address.

I'm hoping that this session information is available via the .NET
framework. Can someone point me in the right direction please.

Thanks.

--
Spence
Computing Services - because IT needn't be difficulthttp://www.compservonline.co.uk/
Take a look at the following link http://codeave.com/asp/svr_variables.asp

This is what your server application could get from the client

1. OS and Browser used - HTTP_USER_AGENT
2. page visited - SCRIPT_NAME
3. IP address - REMOTE_HOST

all this values are available in the Request.ServerVariables object

you can't get length of time on each page, screen size, and browser
window size on the server, you need to use a client javascript
instead.

Also, there are many free third party tools for this, for example,
http://www.google.com/analytics/ All what you need is to include a
javascript code to your pages and it will allow your Google Analytics
account to track your visitors.
Sep 16 '08 #2
In article <3b8ad81d-bb7d-4abc-8e84-
d1**********@2g2000hsn.googlegroups.com>, Alexey Smirnov wrote:

Thanks Alexey.
Take a look at the following link http://codeave.com/asp/svr variables.asp
Need an underscore between svr and variables but got there after a couple of
tries.
This is what your server application could get from the client

1. OS and Browser used - HTTP USER AGENT
2. page visited - SCRIPT NAME
3. IP address - REMOTE HOST

all this values are available in the Request.ServerVariables object
Just what I needed. Thanks.
you can't get length of time on each page, screen size, and browser
window size on the server, you need to use a client javascript
instead.
OK, will look at that.
Also, there are many free third party tools for this, for example,
http://www.google.com/analytics/ All what you need is to include a
javascript code to your pages and it will allow your Google Analytics
account to track your visitors.
I have Google Analytics on the page but find it too cumbersome to find what
I want. Ideally I just want a table of data with the date, time and the
other parameters I mentioned which I can put into a database and do my own
analysis.

--
Spence
Computing Services - because IT needn't be difficult
http://www.compservonline.co.uk/

Sep 17 '08 #3
"Spence" <spencelayhathotmaildotcomwrote in message
news:VA******************@a100-049-vista.tridentsystems.local...
>This is what your server application could get from the client

1. OS and Browser used - HTTP USER AGENT
2. page visited - SCRIPT NAME
3. IP address - REMOTE HOST

all this values are available in the Request.ServerVariables object

Just what I needed. Thanks.
Bear in mind, though, that 1) and 3) above cannot be relied upon at all...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 17 '08 #4
On Sep 17, 10:47*am, Spence <spencelayhathotmaildotcomwrote:
In article <3b8ad81d-bb7d-4abc-8e84-

d117739ba...@2g2000hsn.googlegroups.com>, Alexey Smirnov wrote:

Thanks Alexey.
Take a look at the following linkhttp://codeave.com/asp/svrvariables.asp

Need an underscore between svr and variables but got there after a coupleof
tries.
This is what your server application could get from the client
1. OS and Browser used - HTTP USER AGENT
2. page visited - SCRIPT NAME
3. IP address - REMOTE HOST
all this values are available in the Request.ServerVariables object

Just what I needed. Thanks.
you can't get length of time on each page, screen size, and browser
window size on the server, you need to use a client javascript
instead.

OK, will look at that.
Also, there are many free third party tools for this, for example,
http://www.google.com/analytics/All what you need is to include a
javascript code to your pages and it will allow your Google Analytics
account to track your visitors.

I have Google Analytics on the page but find it too cumbersome to find what
I want. Ideally I just want a table of data with the date, time and the
other parameters I mentioned which I can put into a database and do my own
analysis.

--
Spence
Computing Services - because IT needn't be difficulthttp://www.compservonline.co.uk/
If it's your own server and you have an access to IIS log you can
obtain all 3 items from the IIS log.

Note, as Mark already mentioned 1) and 3) cannot be 100% relied
because of proxies and user agent spoofing. Some browsers such as
Firefox and Opera have functions to send a false User-Agent string.
And REMOTE_ADDR is the address of the remote host making the request,
and if you make a request from behind a proxy you will get an address
of the proxy.

Sep 17 '08 #5
In article <6e4ef12c-71d0-4438-aff6-
ec**********@x35g2000hsb.googlegroups.com>, Alexey Smirnov wrote:
If it's your own server and you have an access to IIS log you can
obtain all 3 items from the IIS log.
Unfortunately not, it's shared hosting.
Note, as Mark already mentioned 1) and 3) cannot be 100% relied
because of proxies and user agent spoofing. Some browsers such as
Firefox and Opera have functions to send a false User-Agent string.
I'm aware of that, but as it's mostly corporate visitors I'm interested
in, I think it's less likely. A risk I'm happy to take, as it's mainly
out of curiosity.
And REMOTE ADDR is the address of the remote host making the request,
and if you make a request from behind a proxy you will get an address
of the proxy.
Reasons to get this info is to exclude my own IP and to check for
repeat visitors. I know if 100 people from one company visit my site
I'll probably see that as one IP, but that has to be better than seeing
visitors with addresses of 192.168.x.y etc.

Thanks for your comments.

--
Spence
Computing Services - because IT needn't be difficult
http://www.compservonline.co.uk/

Sep 18 '08 #6
In article <eI**************@TK2MSFTNGP04.phx.gbl>, Mark Rae [MVP] wrote:
1. OS and Browser used - HTTP USER AGENT
2. page visited - SCRIPT NAME
3. IP address - REMOTE HOST
--- Snip ---<
Just what I needed. Thanks.

Bear in mind, though, that 1) and 3) above cannot be relied upon at all...
I know the Browser can be told to report itself as something different to
what it is, but is there an issue with the OS?

My reason for wanting the IP address is to exclude me from the stats and
also to check on repeat visitors. Most people visiting my site that I want
to monitor are likely businesses with a fixed (block of) IP address(es). Is
there something else I'm not aware of that allows IP address spoofing?

Thanks.

--
Spence
Computing Services - because IT needn't be difficult
http://www.compservonline.co.uk/

Sep 18 '08 #7
On Sep 18, 11:45*am, Spence <spencelayhathotmaildotcomwrote:
Reasons to get this info is to exclude my own IP and to check for
repeat visitors. I know if 100 people from one company visit my site
I'll probably see that as one IP, but that has to be better than seeing
visitors with addresses of 192.168.x.y etc.
Actually, all this can be done with Google Analytics too. Go to
Analytics Settings, click Edit in the Website Profiles and add a
filter for your IP address. This filter will forever exclude all
visits from you. Returned visitors could be found in the Visitors
section. For example, in Hostnames you can find particular host and
number of visits. That report could be also used to exclude your own
host.
Sep 18 '08 #8
"Spence" <spencelayhathotmaildotcomwrote in message
news:VA******************@a100-049-vista.tridentsystems.local...
In article <eI**************@TK2MSFTNGP04.phx.gbl>, Mark Rae [MVP] wrote:
>1. OS and Browser used - HTTP USER AGENT
2. page visited - SCRIPT NAME
3. IP address - REMOTE HOST
--- Snip ---<
Just what I needed. Thanks.

Bear in mind, though, that 1) and 3) above cannot be relied upon at
all...

I know the Browser can be told to report itself as something different to
what it is, but is there an issue with the OS?
Any of the headers can be spoofed...
My reason for wanting the IP address is to exclude me from the stats and
also to check on repeat visitors. Most people visiting my site that I want
to monitor are likely businesses with a fixed (block of) IP address(es).
Is
there something else I'm not aware of that allows IP address spoofing?
http://www.google.co.uk/search?sourc...dress+spoofing
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 18 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ben | last post by:
Hi all, This has been asked in the past in different ways. I'm still a bit confused about setting up counters. I'm quite new to php. I've read few tutorials about writing counters using cookie and...
4
by: Jon | last post by:
Hi, I'm writing a VERY BASIC stats databse for the default page of my web site. I'm detecting various stats and saving them: <% visitdate = date() visittime = time() visitbrowser =...
6
by: Dovelet | last post by:
Hi all, I would like to write DOS program to change the MS Windows Sound Recording source. When I run it with the parameter, it will change the recording source as follow: C:\> abc.exe...
1
by: Sakharam Phapale | last post by:
Hi All, I am developing an application like sound recorder. While recording if there is a silence for more than given time (say 5 seconds), Recording should be paused.
12
by: FluffyCat | last post by:
New on November 28, 2005 for www.FluffyCat.com PHP 5 Design Pattern Examples - the Visitor Pattern. In the Visitor pattern, one class calls a function in another class and passes an instance of...
9
by: ankitdesai | last post by:
I would like to parse a couple of tables within an individual player's SHTML page. For example, I would like to get the "Actual Pitching Statistics" and the "Translated Pitching Statistics"...
2
by: Monu | last post by:
HI All, I am getting problem in using hotshot profiler. When I hotshot with lineevents=0, it works fine, but when I use lineevents=1, I get error in stats here is my code: import hotshot,...
1
by: JosAH | last post by:
Greetings, this week we let go of all that algebraic stuff and concentrate a bit more on what object oriented programming is all about. Java claims to support OO, so why not use it? In this...
4
by: Andy B | last post by:
I want to record the number of times a page was visite into a sql server database. This will be part of the admin stats for the website. Any ideas how to do something like this? d
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.