开发者

Counting the number of visitors for a web page - JavaScript and Struts

I need to keep track of the number of visitors to a web page.

I have planned like this: on load of the home page, I will call a javascript callCounter(); From javascript, I need then to call an action and update a record in database.

Please help me with this. How do i call the action? I should be in the same home jsp after updating database.

Thanks in advance, Dh开发者_运维问答ananjay


I'd suggest using a popular, ready-to-use counter solution, like:

  • clicky
  • google analytics

Otherwise you'll need to call a struts action via ajax.


I am using Google Anlytics now,

I don't know how to figure out the pagevisits based on individual pages of my website. Like number of visits to home page (URL for home page), number of visits to offer page and so on..
how do categorize the counts. now the report looks lik this- Visits · 1,867 Pageviews · 9,383 Pages/Visit · 5.03 Bounce Rate · 27.85% Avg. Time on Site · 00:05:36 % New Visits · 45.31%

Please give some suggestions

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜