Mouse Tracker – Using Javascript to track mouse movement

Open Source Mouse Tracking Script

Here’s a little script I wrote a long time ago (2006) that could collect users mouse
movements and clicks on a site, save to a database, and generate an
image showing a “click stream” of the users activity.

This was well before services like clicktale were around, so I thought I would open source my scripts so that someone may find them useful. If you want a reliable hosted solution I suggest you do some googling and sign up for the free trials that various mouse tracking websites provide.

The open source mouse tracking code is available over at


Boring History:

My end goal was to create a website that could re-structure it’s (dropdown/heirarchy) menu automatically to reduce the overall distance the average users mouse would travel.

View the original website here:

Also was interested to see how many people read text with their mouse (after observing this with a few friends).

Also could build up a “common path” to find out how most users process a website navigation (ie: hover over each drop down).

Could also combine this with search engine referrals to work out which keyword searches produce more confused users (ie: ones who fiddle with navigation for a long time) verse keyword referrals that are clearly defined.

Leave a Reply

Your email address will not be published.