firebase_analytics: ^8.2.0 copied to clipboard
Flutter plugin for Google Analytics for Firebase, an app measurement solution that provides insight on app usage and user engagement on Android and iOS.
Google Analytics for Firebase #
A Flutter plugin to use the Google Analytics for Firebase API.
For Flutter plugins for other Firebase products, see README.md.
To use this plugin, add
firebase_analytics as a dependency in your pubspec.yaml file. You must also configure firebase analytics for each platform project: Android and iOS (see the example folder for details).
If you wish to use Firebase Analytics without IDFA collection capability, open your
/ios/Podfile and add the following global variable to the top of the file:
$FirebaseAnalyticsWithoutAdIdSupport = true
Track PageRoute Transitions #
PageRoute transitions, add a
FirebaseAnalyticsObserver to the list of
NavigatorObservers on your
Navigator, e.g. if you're using a
FirebaseAnalytics analytics = FirebaseAnalytics(); MaterialApp( home: MyAppHome(), navigatorObservers: [ FirebaseAnalyticsObserver(analytics: analytics), ], );
You can also track transitions within your
PageRoute (e.g. when the user switches from one tab to another) by
RouteAware and subscribing it to
for an example of how to wire that up.
Getting Started #
example directory for a complete sample app using Google Analytics for Firebase.
Issues and feedback #
Please file FlutterFire specific issues, bugs, or feature requests in our issue tracker.
Plugin issues that are not specific to Flutterfire can be filed in the Flutter issue tracker.