Build better Flutter apps with analytics!
Flutter plugin for Google Analytics for Firebase, an app measurement solution that provides insight on app usage and user engagement on Android and iOS.
Flutter Package implementing Facebook Analytics.
https://developers.facebook.com/quickstarts/
Complete only: Add SKD, App Info, Key Hashes
https://developers.facebook.com/quickstarts/
Complete only: Configure(add XML snippet to plist), Bundle Identifier
add this line in ios/Podfile to 9.0 (in most cases just uncomment this line in the beginning of Podfile)
platform :ios, '9.0'
import 'package:facebook_analytics/facebook_analytics.dart';
final facebookAnalytics = FacebookAnalytics();
...
RaisedButton(onPressed: () {
facebookAnalytics.logEvent(
name: "test_event",
parameters: {"value": 10, "subname": "exampleStringValue"},
);
})
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 or https://codelabs.developers.google.com/codelabs/flutter-firebase/#4 for step by step details).
To track PageRoute
transitions, add a FirebaseAnalyticsObserver
to the list of NavigatorObservers
on your Navigator
, e.g. if you’re using a MaterialApp
:
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 implementing RouteAware
and subscribing it to FirebaseAnalyticsObserver
. See example/lib/tabs_page.dart
for an example of how to wire that up.
See the example
directory for a complete sample app using Google Analytics for Firebase.
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.
To contribute a change to this plugin, please review our contribution guide, and send a pull request.
#flutter #firebase #mobileapps