I had also to add this type of navigation for a site that was used inside an iframe inside of a browser extension.
Check this example. I had to track navigation myself.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.