A Flutter plugin to use the Google Analytics for Firebase API.
For Flutter plugins for other Firebase products, see FlutterFire.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 or https://codelabs.developers.google.com/codelabs/flutter-firebase/#4 for step by step details).
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.
example directory for a complete sample app using Google Analytics for Firebase.
PlatformExceptions caught by
METHODAndroid constant used for
NavigatorObserver) to automatically log
Demonstrates how to use the firebase_analytics plugin.
For help getting started with Flutter, view our online documentation.
Add this to your package's pubspec.yaml file:
dependencies: firebase_analytics: ^1.2.0
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|3.0.2||May 30, 2019|
|3.0.1||May 9, 2019|
|3.0.0||May 7, 2019|
|2.1.1+3||Apr 18, 2019|
|2.1.1+2||Apr 14, 2019|
|2.1.1+1||Apr 12, 2019|
|2.1.1||Apr 3, 2019|
|2.1.0||Mar 28, 2019|
|2.0.3||Mar 6, 2019|
|2.0.2+1||Feb 21, 2019|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on May 30, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
|Dart SDK||>=2.0.0-dev.28.0 <3.0.0|