Track mouse movements


Tealeaf Web SDK provides the capability to track mouse movements. Tealeaf records mouse movements of users on webpages and simulates the movements in Replay. The mouse movement feature gives you more details about user behavior than heatmaps because you can see the mouse's path. With heatmaps you only see mouse clicks. This information allows designers to evaluate the website and redesign the UI for an improved user experience.

Note: The mouse movement feature tracks movements of the mouse cursor on a screen and cannot track movements on mobile devices.

Data Limit

Mouse movement data is recorded continuously. The limit is 1000 mouse positions for the current screenview. After the limit is reached, recording of mouse movements stops.


Use the following code to implement mouse movement in Web SDK.

mousemove: {
    enabled: true,
    sampleRate: 200,
    ignoreRadius: 3

The following table provides descriptions of the mouse movement properties.

enabledTo track mouse movements, enable the mouse movement feature by setting enabled to true. By default, enabled is set to false.
sampleRateThe sampleRate property specifies the periodic rate by which Tealeaf records the mouse position. By default, the rate is every 200 milliseconds. For a smoother replay of mouse movement, you can lower sampleRate. To ensure an optimal rate for your needs, perform adequate testing.
ignoreRadiusThe ignoreRadius property tells Tealeaf to ignore recording a mouse position if the mouse is within the specified radius from the last recorded position. By default, Tealeaf ignores recording a position if the mouse is within 3 pixels of the last position.