We are using websocket to send user activity events such as clicks,mousemove,scroll,input and ... Along with it, we send html dom snapshot too. The average size of html snapshot is around ~300 kb. In some cases, the html snapshot has not reaching our servers. Below are the few scenarios.
User only just stays a few seconds and closes the window.
While in slow network
We tried sending remaining events on beforeunload
event that is also not working.
Is there anyway to solve this problem?