Writing a JS Mouse Tracker


When designing a website, it’s important to collect metrics. With the right data, you can learn more about how users are viewing your site, which elements seem to draw their attention more, and what parts you can change. Since mouse movement have been found to be highly correlated with what users look at on a site, a good metric to obtain would be data on the user’s mouse movements. This can be done simply and anonymously through a jQuery script.

First, to get the mouse’s position whenever it moves on the page, we can write a simple event listener:

Creating an object to store the x and y values at certain times, the tracker can generate an array of objects that track the mouse position at every moment in time. However, this is overkill. There will be a ton of data generated for every page every time the user moves…

View original post 103 mots de plus


Laisser un commentaire

Choisissez une méthode de connexion pour poster votre commentaire:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )


Connexion à %s