I have a page that I need to tell how many INDEPENDANT hits have occurred.
I have the following code:
Sub Page_Load(sender as Object, e as EventArgs)
if not IsPostBack then
Call InsertAuditRecord()
end if
End Sub
Which just writes out to a table on who hit this page for a particular
record.
This works fine, but if you do a refresh, it gets counted as another hit
since it isn't a postback. Also, the user can go to another page and then
come back to this page and it is another hit.
Is there a clean way to handle this so that only one hit to the page/record
is recorded once for each visitor?
This is for users that haven't logged on yet, so I don't have any logon
credentials yet.
I was thinking of putting a cookie on their machine to track it, but don't
know if that is the best way.
Thanks,
Tom. 2 1065
Yes, I would think that cookies would be a good informal way of doing this.
It's not 100% bullet proof since people could delete their cookies, but you
may not need it to be 100% bullet proof.
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://SteveOrr.net
"tshad" <ts**********@ftsolutions.comwrote in message
news:O%****************@TK2MSFTNGP04.phx.gbl...
>I have a page that I need to tell how many INDEPENDANT hits have occurred.
I have the following code:
Sub Page_Load(sender as Object, e as EventArgs)
if not IsPostBack then
Call InsertAuditRecord()
end if
End Sub
Which just writes out to a table on who hit this page for a particular
record.
This works fine, but if you do a refresh, it gets counted as another hit
since it isn't a postback. Also, the user can go to another page and then
come back to this page and it is another hit.
Is there a clean way to handle this so that only one hit to the
page/record is recorded once for each visitor?
This is for users that haven't logged on yet, so I don't have any logon
credentials yet.
I was thinking of putting a cookie on their machine to track it, but don't
know if that is the best way.
Thanks,
Tom.
"Steve C. Orr [MVP, MCSD]" <St***@Orr.netwrote in message
news:uH**************@TK2MSFTNGP03.phx.gbl...
Yes, I would think that cookies would be a good informal way of doing
this.
It's not 100% bullet proof since people could delete their cookies, but
you may not need it to be 100% bullet proof.
That was what I figured. Probably the best I can do.
Thanks,
Tom
>
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://SteveOrr.net
"tshad" <ts**********@ftsolutions.comwrote in message
news:O%****************@TK2MSFTNGP04.phx.gbl...
>>I have a page that I need to tell how many INDEPENDANT hits have occurred.
I have the following code:
Sub Page_Load(sender as Object, e as EventArgs) if not IsPostBack then Call InsertAuditRecord() end if End Sub
Which just writes out to a table on who hit this page for a particular record.
This works fine, but if you do a refresh, it gets counted as another hit since it isn't a postback. Also, the user can go to another page and then come back to this page and it is another hit.
Is there a clean way to handle this so that only one hit to the page/record is recorded once for each visitor?
This is for users that haven't logged on yet, so I don't have any logon credentials yet.
I was thinking of putting a cookie on their machine to track it, but don't know if that is the best way.
Thanks,
Tom.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: johnny |
last post by:
hi !
I use to track ( with an image with id attached to its link ) the
opening of some html messages ( don't worry I am not a spammer,they are
newsletters sent to the salesforce ).
Today I...
|
by: Peter Jenkins |
last post by:
The client for which I do this site www.safenz.org.nz wants stats
tracking/a visitor counter, like the one that is there at the moment
(at the bottom of the home page). However I would like one...
|
by: Amil |
last post by:
I want to track page hits, but I won't want to record when a bot (e.g.
google) visits my page. I currently have the META NOFOLLOW HTML on, but
that doesn't force a bot to not visit embedded links....
|
by: Terry |
last post by:
Hi folks.
I was thinking about rolling my own anlaytics service for sites that I
am working on.
I had the idea of using javacript to find all the links on a page and
then attach handlers to...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |