Recording user data for heatmap with JavaScript

后端 未结 5 1651
孤独总比滥情好
孤独总比滥情好 2020-12-13 00:12

I was wondering how sites such as crazyegg.com store user click data during a session. Obviously there is some underlying script which is storing each clicks data, but how i

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 01:05

    If you're just looking for interaction, you could replace your with . These are automatically submitted with the X, Y coordinates of where the user has clicked.

    jQuery also has a good implementation of the mousemove event binding that can track the current mouse position. I don't know your desired end result, but you could setTimeOut(submitMousePosition, 1000) to send an ajax call with the mouse position every second or something like that.

提交回复
热议问题