Google Analytics for Firebase

What does it do?

Google Analytics is a free app measurement solution that provides insight on app usage and user engagement. Analytics reports help you understand clearly how your users behave, which enables you to make informed decisions regarding app marketing and performance optimizations.

Installation

1. Add dependency

pubspec.yaml
dependencies:
flutter:
sdk: flutter
firebase_core: "^0.5.0"
firebase_analytics: "^6.0.0"

2. Download dependency

$ flutter pub get

3. (Web Only) Add the SDK

If using FlutterFire on the web, add the firebase-analytics JavaScript SDK to your index.html file:

web/index.html
<html>
...
<body>
<script src="https://www.gstatic.com/firebasejs/7.20.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.20.0/firebase-analytics.js"></script>
</body>
</html>

4. Rebuild your app

Once complete, rebuild your Flutter application:

$ flutter run

Next Steps

Once installed, you're ready to start using Firebase Analytics in your Flutter Project.

Additional documentation will be available once the Firebase Analytics plugin update lands as part of the FlutterFire roadmap.