| Author |
how to keep track of a number of visits to a particular page in a website
|
jyothi tammana
Greenhorn
Joined: Dec 09, 2009
Posts: 2
|
|
Hello Ranchers,
I am new to post a question in here, but not new to Java Ranch. This is a very helpful site for people like me. Thanks to everyone responsible to keep this site up and running.
Here is my problem
I have user with multiple contracts. Depending on the contract, i need to display an offers page. So the offers page is contract specific. I have to keep track of the number of visits to offer page for that contract. I have to increment the count only once in a session.
How can I do that?
For the same page, if the session is idle for 15seconds on that page, I need to popup some information.
Could someone help me with these two issues.
Thank You in Advance
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26496
|
|
Jyothi,
Welcome to becoming a registered user .
1) I don't really follow this. You want to count the offer page visits across users, but only have each user count once?
2) For an idle time, you would have a JavaScript function that pops up after that time. 15 seconds is hardly anything though. Perhaps you want something longer?
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Ganesh Gowtham
Ranch Hand
Joined: Mar 30, 2005
Posts: 223
|
|
hi jyothi tammana
ou can use Google Analytics ,
1) Need to have Google Account
2) register in Google Analytics and get Web Tracker Id and gives you Java Script code
3) call that JS code in Index page of web site ...
Let me know if you need some help .
Thanks
Ganesh Gowtham
|
Thanks, Ganesh Gowtham
http://ganesh.gowtham.googlepages.com
|
 |
xsunil kumar
Ranch Hand
Joined: Dec 14, 2009
Posts: 125
|
|
Tammana ,
There is one javascript function that will popup after specific time. Name of that function is not currently top of my head. Check out for below URL
http://www.comptechdoc.org/independent/web/cgi/javamanual/javawindow.html
You will get relevant data. Hope this will help you.
-Sunil
|
 |
jyothi tammana
Greenhorn
Joined: Dec 09, 2009
Posts: 2
|
|
Thank You everyone for the reply. To track the number of visits to the page, I am storing the visit counter in a database.
I will be using a javascript to pop up the message when the user is on the page for more than 15 seconds. we are still doing the design for the project. so I have included these details in the design.
I might need your help during the development
Thanks
Jyothi
|
 |
 |
|
|
subject: how to keep track of a number of visits to a particular page in a website
|
|
|