4 ms·
I get how these things record the mouse coordinates, but how do they accurately render the entire page in the replay without taking a video? For example, I was
by devmunchies 6y ago
I get how these things record the mouse coordinates, but how do they accurately render the entire page in the replay without taking a video?
For example, I was resizing the browser and in the replay it was showing the sizes of buttons change correctly.
- jessaustin 6y agoIt might be observing the resize event? https://developer.mozilla.org/en-US/docs/Web/API/Window/resize_event https://developer.mozilla.org/en-US/docs/Web/API/Window/resi...
- katsura 6y agoThey just render the whole page inside a frame. If there was a resize on the page, the frame itself is resized as well, so you should see pretty much the same thing as the visitor. Note that this doesn't handle browser inconsistencies though. So something like that wouldn't be reflected in the "recording".
- tantalor 6y agoWhat about the user's cookie?
- XCSme 6y agoIn this case, if it uses rrweb, it just stores all the HTML and all DOM mutations that happen. This is a pretty accurate method (even though still doesn't record all events, for example text selection, and if you watch an mp4 video for example, it won't save the entire video, only the URL to it), but it uses a lot of data. In my case, I created a more simple solution for userTrack.net, where I just store the URL, record all events that happen and replay them by loading the iframe at the same URL and re-triggering all the events. It's not as accurate as storing HTML and mutations, but it uses a lot less data.
- helloiloveyou 6y agoI don't understand something. If you replay the events on an iframe of the real URL, each time I play the video you are hitting the site's real API? Like, if I watch the video where the user adds an item to it's cart, will the same item get added twice because I watched the video?
- XCSme 6y agoYes, that is true and one of the biggest limitations of the system currently, this is why it's mostly suited for sites that don't load dynamic data (eg. landing pages, news sites, blogs, etc.) Currently to avoid executing events twice, you can disable action replay on a specific button (it will show the click event but not replay the action). I have always considered implementing or using something like rrweb but the performance and privacy implications are huge. Still a lot of customers would prefer that, mostly for the ecommerce cases you mentioned.
- mahesh_rm 6y agoYes, this is correct. Sessionforward is based in a fork of rrweb, which integrates into multiple other MIT licensed libraries. As such, it creates a full snapshot of your page and it's mutations, and it then renders them through and iframe.