Custom Events is not showing up on firebase dashboard at all
1,224
Analytics events are sent to Firebase every hour or so, try using debug view instead https://firebase.google.com/docs/analytics/debugview
Author by
Anirudh Sharma
I started with nothing, and I still have most of it.
Updated on December 01, 2022Comments
-
Anirudh Sharma over 1 year
I cant see any update on firebase analytics dashboard. Also any example could help
That's my setup.
Widget build(BuildContext context) { FirebaseAnalytics analytics=new FirebaseAnalytics(); FirebaseAnalyticsObserver observer=new FirebaseAnalyticsObserver(analytics: analytics); return GraphQLProvider( client: client, child: CacheProvider( child: MaterialApp( debugShowCheckedModeBanner: false, title: 'Baseball', theme: themedata(), navigatorObservers: <NavigatorObserver>[observer], home: getWidgetByRouteName(hasRoute,analytics,observer), routes: <String, WidgetBuilder>{ '/season': (BuildContext context) => Season(), '/signInGraphQL': (BuildContext context) => SignInGraphQL(), '/teamSelect': (BuildContext context) => Team(), '/teamDetails': (BuildContext context) => TeamDetails(), '/phone': (BuildContext context) => Phone(), }, ), ), ); } ///directs app to the last opened page before closing application static Widget getWidgetByRouteName(bool hasRoute,analytics,observer) { // Put all your routes here. if (hasRoute) { return SignInGraphQL(); } else { return SplashPage(analytics:analytics,observer:observer); } }
Also is there any working example available that would be helpfull and here is onclick button event.
class Button extends StatelessWidget { final FirebaseAnalytics analytics; final FirebaseAnalyticsObserver observer; Button({this.analytics,this.observer}); Future<void> _sendAnalyticsEvent() async { await analytics.logEvent( name: 'test_event', parameters: <String, dynamic>{ 'string': 'string', 'int': 42, 'long': 12345678910, 'double': 42.0, 'bool': true, }, ); } @override Widget build(BuildContext context) { return SizedBox( height: 70, width: double.infinity, // height: double.infinity, child: InkWell( onTap: () { _sendAnalyticsEvent(); FirebaseAuth.instance.currentUser().then((user) { if (user != null) { user.getIdToken().then((token){ print("Firebase IdToken: "+token); centralstate.idToken=token; });
Terminal is not showing up any error. But i can't see any updates on firebase dashboard. Any suggestions?? thanks