Navigation Capture

Capture app navigation events

User navigation between app pages is captured in session replay via LogRocketNavigatorObserver. When registered, the navigator observer captures navigations to and away from pages in apps. Note that support currently covers navigations that use Flutter's Navigator.of(context).push and pop API.

Registering the navigation observer

Register LogRocket's navigation observer on construction of your WidgetsApp or any of its subclasses, such as MaterialApp. Passing a URL host to the navigator observer's constructor will form the base of URLs generated for navigation events.

class App extends StatelessWidget {
	const App({super.key});
  
  @override
  Widget build(BuildContext context) {
  	return LogRocketWidget(
    	child: MaterialApp(
        title: 'Flutter App',
        home: HomePage(),
        navigatorObservers: [LogRocketNavigatorObserver('example.com')]
        theme: ...
			)
    );
  }
}

Support for tagging custom pages outside of Navigator flows is coming soon.