Starts monitoring client-side navigation and automatically calls recordView
whenever the URL changes. The implementation adapts to the configured nav type:
"hash": listens for hashchange events.
"history": patches pushState/replaceState and listens for popstate.
"natural": returns a no-op because full page loads already trigger views.
Returns ()=>void
A cleanup function that detaches any listeners and restores patched APIs.
Starts monitoring client-side navigation and automatically calls
recordViewwhenever the URL changes. The implementation adapts to the configured nav type:"hash": listens forhashchangeevents."history": patchespushState/replaceStateand listens forpopstate."natural": returns a no-op because full page loads already trigger views.