View Tracking
To track views automatically add an instance of MBAutomationNavigatorObserver to the navigatorObservers of your app, like this:
1
@override
2
Widget build(BuildContext context) {
3
return MaterialApp(
4
navigatorObservers: [MBAutomationNavigatorObserver()],
5
home: ...,
6
);
7
}
Copied!
The navigator observer will send the name of the PageRoute (route.settings.name) tto MBurger whenever a new route is pushed or popped.
If you don't wnat to use the navigator observer you can use this function, to track a view manually.
1
MBAutomation.trackScreenView('VIEW');
Copied!
As the events, views are saved in a local database and sent to the server every 10 seconds and you can change the frequency setting the eventsTimerTime property.
Last modified 1yr ago
Copy link