possible to see where visitors are moving their mouse on website using javascript?

StackOverflow https://stackoverflow.com/questions/931683

  •  06-09-2019
  •  | 
  •  

Question

i know that there are websites which can detect where the mouse is moving on the screen on a website, and then display a movie of that visit. like robotreplay or clicktale.

how do they do that?

Was it helpful?

Solution

Use the onmousemove event handler to capture the mouse move. Than you can read the x and y coordinates of the mouse cursor:

window.onmousemove = function(e) {
    document.documentElement.innerHTML = e.x + ":" + e.y;
};

OTHER TIPS

The mousemove event.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top