Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to keep track of a number of visits to a particular page in a website

 
jyothi tammana
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ganesh Gowtham
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
xsunil kumar
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic