google analytics is not enough. I need to record more than that provides such as how long each user stays at my site, what texts they type in the text fields, what he/she clicks and how long he/she stays at the sub pages, etc.
【在 c*****t 的大作中提到】 : No need to use Java. For your need, google analytics is more than : good enough.
k*r
4 楼
我也感兴趣,不一定是java,而是原理上是如何实现的。我想来, 1. 如果想track logged in user activities,就用login/logout可能最简单,但是不 能包含没有login的时间。这个可以通过下面的方法解决 2. 如果想track没有login的user,应该不需要在server side generates user session,而是把first_browse和last_browse两个时间放到cookie里面。如果last_ browse距离下一次browse太远,就timeout这个session,记录last_browse - first_ browse为在线时间,然后reset first_browse和last_browse cookie value。Server仍 然可以generate a session key但不需要放在database里面。这样用户在logout之后, 仍然可以继续track同一个用户。
I would use AOP to log activities. User behaviors trigger certain functions, you can monitor these functions and log/process them (parameters, e.g inputs included) And later on you can find a way to do analysis.
,
【在 u*****n 的大作中提到】 : google analytics is not enough. I need to record more than that provides : such as how long each user stays at my site, what texts they type in the : text fields, what he/she clicks and how long he/she stays at the sub pages, : etc.
p*e
6 楼
you need to use javascript to collect those data, and upload those data to server side for persistence. Java can' help you too much in this case.
javascript can be an idea, but I will not recommend it due to many problems. It is more like a hacker way. The standard way is defining a filter to do it. Or if you do not like the filter, and you happen to use front controller, using front controller instead.
u*n
8 楼
thanks. guys. have you used google GWT? is it a good option for this purpose too?
problems.
【在 s******e 的大作中提到】 : javascript can be an idea, but I will not recommend it due to many problems. : It is more like a hacker way. : The standard way is defining a filter to do it. Or if you do not like the : filter, and you happen to use front controller, using front controller : instead.
k*r
9 楼
hmm. not sure what a GUI toolkit has to do with user tracking ...
【在 u*****n 的大作中提到】 : thanks. guys. : have you used google GWT? is it a good option for this purpose too? : : problems.