Track mouse movements

The 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.

Configuration

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.

ParameterValueDescription
enabledBoolean. Default value - false.Lets you enable mouse movement tracking.
sampleRateInteger (in milliseconds). Default value - 200.Specifies the periodic rate by which the Tealeaf library records the mouse position. For a smoother replay of mouse movement, you can lower the default value. To ensure an optimal rate for your needs, perform adequate testing.
ignoreRadiusInteger (in pixels). Default value - 3.Tells the Tealeaf library to ignore recording a mouse position if the mouse is within the specified radius from the last recorded position.