Is there any API to show firebase analytics in the flutter app?
analytics
flutter
2
Firebase Analytics Integration
Create a new class with the name FirebaseAnalyticsService
FirebaseAnalyticsService
import ‘package:firebase_analytics/firebase_analytics.dart’; import ‘package:firebase_analytics/observer.dart’; class FirebaseAnalyticsService { final FirebaseAnalytics _analytics = FirebaseAnalytics(); FirebaseAnalyticsObserver appAnalyticsObserver() => FirebaseAnalyticsObserver(analytics: _analytics);}
Now register this class in our servicelocator file:
servicelocator
serviceLocator.registerLazySingleton(() => FirebaseAnalyticsService());
reference: https://medium.datadriveninvestor.com/how-to-add-firebase-analytics-to-your-flutter-app-641fbda1d224
You may consider Google Analytics Data API which gives you programmatic access to Google Analytics 4 (GA4) report data. Note that data isn’t in realtime and reporting also undergoes delays in processing as described in this blog post.
Click here to cancel reply.
2
Answers
Firebase Analytics Integration
Create a new class with the name
FirebaseAnalyticsService
Now register this class in our
servicelocator
file:reference: https://medium.datadriveninvestor.com/how-to-add-firebase-analytics-to-your-flutter-app-641fbda1d224
You may consider Google Analytics Data API which gives you programmatic access to Google Analytics 4 (GA4) report data. Note that data isn’t in realtime and reporting also undergoes delays in processing as described in this blog post.