problem description
there are three ABC, pages under a domain name, and there are links to other domain names in the C page. The entry of the web page is page A, and you need to count the browsing time under the domain name (start when the page enters, close the page). The definition of a closed page is to click back on page An or close it directly on the BC page
.the environmental background of the problems and what methods you have tried
the existing solution is to create a new page D, where page D contains iframe nested page A, monitor page D with onbeforeunload and onpagehide, and send an ajax request to the backend after the page is closed.
disadvantages
but now I find that iframe has a lot of weird bug, on IOS that needs to be adjusted to the ABC page to fit the iframe under IOS.
is there any good way to deal with the need for cross-page browsing time statistics?