A simple mouse tracking library to provide insights on how your users are handling your layout / user experience.
This library was created so you don't need an external service to "record" your users mouse events and "play" them in a later moment.
mus works with any AMD you wish and its setup is extremely simple - 5.6kb
// Instantiate a mus object
var mus = new Mus();
// Start recording
mus.record();
// After a while, stops
setTimeout(function() {
mus.stop();
}, 5000);
// Sets playback speed (optional, default NORMAL)
mus.setPlaybackSpeed(mus.speed.SLOW);
// Starts playing and enjoy
mus.play();
Starts a recording session for current screen. If there is already a session recorded, it appends to it.
Stops a recording or a playback.
Plays current recording session.
Pauses current playback.
Releases all data recorded or set.
Returns all data collected during recording.
Sets custom data for playback. It must be a JSON object collected from getData
.
Same as setData
, but allows only to set the frames
array.
During recording, all data collected contains window dimensions as well, so if your recorded data comes from a different window dimension, mus automatically adapts to current window size. This function allows you to set a custom playback window size if you decide to use setFrames
instead of setData
(that already sets windows dimensions).
Allows playback to be faster or slower.
Default constants: mus.speed.SLOW
(35), mus.speed.NORMAL
(15), mus.speed.FAST
(5)
You may decide to use custom values as you wish.
Records time elapsed for each point for a precise data recording. Default: disabled
Informs if mus is currently recording something.
Informs if mus is currently playing something.
Informs if mus is recording time for each data point.
- Detect touch movements and clicks;
- Get form inputs;
- Allows real clicks during setup (default false);
- Suggestions are greatly appreciated!
- Added time point recording for precise data;
- Added minified file for distribution;
MIT