@99devco/analytics - v3.1.0
    Preparing search index...

    Function watch

    • 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.

      const stop = watch();
      // ...later
      stop();