跟踪用户活动 [英] tracking user activities

查看:73
本文介绍了跟踪用户活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i试图了解如何在登录后获得用户活动,例如访问过的网页,点击次数,尝试访问管理页面(示例),等......我在某处读到,我不记得在哪里,有办法获取这些信息。



我需要什么:



1.用户登录时间/退出时间

2.用户活动(访问过的页面和时间)

3.用户活动(尝试访问管理页面的时候)



我只需要理解这个理论,我怎么能告诉代码查找这些信息?例如,登录时我也可以获得当前时间和注销。现在部分(2,3)我可以用什么代码或javascript来获取这些信息?



谢谢,

Hi,

i am trying to find out how can i get user activities after login such as pages visited, clicks, trying to access admin page (example), etc... i read somewhere, i don't remember where, there is a way to get that information.

What I need:

1. user login time / logout time
2. user activities (pages visited and when)
3. user activities (trying to visit admin page, when)

I just need to understand the theory, how can i tell the code to look for this information? For examples, when logged in i can get the current time and for the logout as well. Now for parts (2,3) what code or javascript that i can use to get this information?

thanks,

推荐答案

您好,只需创建一个表并插入所有用户活动。无论在何处,例如,如果您想要跟踪用户访问的页面,只需在用户进入页面时在用户活动表中插入记录(在页面加载事件中)。像这样,无论你想要什么,只需在上表中插入一条记录。
Hi, just create a table and insert all user activities. Wherever, for example if you want to track the page visited by the user, just insert a record in the user activity table when the user entering into the page (in page load event). Like this, wherever you want, just insert a record to the above table.


这篇关于跟踪用户活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆