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?


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;


The mousemove event.

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