buildNavigationTrackerJs function
Builds the JavaScript navigation tracker injected into every page (at document start, in all frames).
The script monkey-patches history.pushState/replaceState and listens
to popstate/hashchange/pageshow, reporting each URL change through
the __zikzakNavigationTracker__ JavaScript handler with trigger
'jsHistory'. Events fired before the Dart side has registered its
handler are buffered in-page and flushed when NavigationTracker calls
window.__zikzakNavigationTracker__.ready() (same pattern as the
network capture interceptor).
Implementation
String buildNavigationTrackerJs() => navigationTrackerJsTemplate;