用户活动跟踪或使用javascript记录 [英] User Activity Tracking or Logging with javascript

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

问题描述

是否可以跟踪用户在网页上的每个动作并创建日志?这个想法是通过AJAX将用户操作的日志传送到服务器并保存。在每个元素的每个事件上,我可以编写代码/逻辑来写一些登录控制台,但是我想知道是否有可用的库/快捷方式,可以在客户端的网页上记录所有操作,包括事件和操作,如复制,粘贴,点击,双击,选择等等。

Is it possible to track every action of a user on a webpage and creating log of it? The idea is to transfer log of user actions to server via AJAX and saving it. On each event for each element I can write code/logic to write some log in console, but I was wondering if there is any library/shortcut available which can log all actions on webpage at client side including events and actions such as copy, paste, click, double click, selection etc. with their element reference.

推荐答案

您可以使用现成的解决方案:

You can use ready-made solutions:

  • http://www.google.com/analytics/
  • http://www.clicktale.com/
  • https://segment.io/
  • http://www.extrawatch.com/
  • http://mouseflow.com/
  • https://www.seevolution.com/
  • http://clicky.com/

你ca使用Google Analytics(分析)及其事件跟踪器,可以做出令人惊奇的事情:

You can do amazing stuff with Google Analytics and its Event Tracker:

  • https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
  • http://searchenginewatch.com/article/2287906/10-Google-Analytics-Custom-Events-That-Track-the-Untrackable

如果您正在寻找定制的解决方案,您可以尝试以下一个PHP和JavaScript:

If you're looking for a custom-made solution, you can try the following one with PHP and JavaScript:

  • http://css-tricks.com/tracking-clicks-building-a-clickmap-with-php-and-jquery/

请记住,使用第三方解决方案在性能上更好。实时地在数据库中写入鼠标移动的坐标,需要大量资源。

Keep in mind that using third-party solutions is better performance-wise. Writing the coordinates of the mouse movements in a database in real time, needs a lot of resources.

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

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