In the Vue single page application, how to record the returned events of the browser manipulated by the user?

the project needs to be buried to record which pages the user clicked on the browser to return, and sent to the background to detect how the event should be written. Some pages in the project need to be tested, but not all.

Jul.14,2021

1. For a more stupid solution, vue comes with it. In the page to be tested, write the beforeRouteLeave (to,from,next) hook to listen to where the to.paht is going (but you need to know where the superior page of the current page is). The disadvantage is that if you leave the full connection https://. Cannot listen
2. Using js's popstate , the advantage is that you don't have to write it individually, and the disadvantage is that Apple's side slip does not go away.


this in itself is an unreasonable requirement, you are an webview application.

you go to monitor the return event of App. People say that if you don't listen, you won't be monitored. If they say they go around and return, they will bypass you to return.

is very unreliable, it is better to count it by APP. Not your side.

if statistics are not required, it is recommended to send buried data when using history api, popState of h5

Menu