Closed Alex-web0 closed 9 months ago
Thanks for the report. I ran the plugin example and will wait until tomorrow to see if the events were captured are not. Meantime, can you confirm if the events are being printed locally in the console ? ie, events are indeed being fired from plugin side ? This is just to confirm that the issue is with plugin or with firebase console that it is not able to receive the events.
Thanks for the report. I ran the plugin example and will wait until tomorrow to see if the events were captured are not. Meantime, can you confirm if the events are being printed locally in the console ? ie, events are indeed being fired from plugin side ? This is just to confirm that the issue is with plugin or with firebase console that it is not able to receive the events.
I have confirmed that actually, the events are not sent to the server, if you fire them they will not be sent until the app uninstalls
@Alex-web0
I verified in firebase console analytics dashboard and observed that the test_event
was captured properly as shown below:
@darshankawar Thank you so much, can you provide me with some more details
1) Did you run the example project only without changing any params other than firebase options 2) How much did the event take to appear on the dashboard, you mentioned in another reply that you would "wait for tomorrow" Is that related? 3) Can you please use the real-time tab on Google Analytics, I used it to produce the error in my example and the use case needs the realtime feature to work. Also if it doesn't log the events in real-time, try after logging some events to uninstall the app, they will all appear in one go.
- Did you run the example project only without changing any params other than firebase options
Yes.
2. How much did the event take to appear on the dashboard, you mentioned in another reply that you would "wait for tomorrow" Is that related?
Somewhat. It usually updates throughout the day periodically. You can read about it here.
3. Can you please use the real-time tab on Google Analytics,
This probably will be beyond the plugin's control, as the data is passed via firebase console to GA.
If you want to confirm really whether the events are indeed being triggered locally or not, you can try to use the adb command like this and see if it helps in your case or not.
Hey @Alex-web0. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@Alex-web0 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Bug report
Describe the bug Firebase google analytics package not logging any events on the dashboard. The app will not change anything in the realtime panel and only when I uninstall the app entirely does the logs show up
Steps to reproduce
Steps to reproduce the behavior:
firebase_core, firebase_analytics
of the latest versionsimport 'firebase_options.dart';
void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, );
FirebaseAnalytics.instance;
runApp(MyApp(firebaseAnalytics: FirebaseAnalytics.instance)); }
class MyApp extends StatelessWidget { const MyApp({super.key, required this.firebaseAnalytics});
final FirebaseAnalytics firebaseAnalytics;
@override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', navigatorObservers: [ FirebaseAnalyticsObserver(analytics: FirebaseAnalytics.instance), ], theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: MyHomePage(title: 'Flutter Demo Home Page', firebaseAnalytics: firebaseAnalytics), ); } }
class MyHomePage extends StatefulWidget { const MyHomePage({super.key, required this.title, required this.firebaseAnalytics});
final FirebaseAnalytics firebaseAnalytics;
final String title;
@override State createState() => _MyHomePageState();
}
class _MyHomePageState extends State {
int _counter = 0;
void _incrementCounter() async { try { FirebaseAnalytics.instance.setCurrentScreen(screenName: "ssss20832us8028$_counter"); await FirebaseAnalytics.instance.logEvent( name: 'first_open2', callOptions: AnalyticsCallOptions(global: true), parameters: { 'ss': "SCREEN${DateTime.timestamp().millisecondsSinceEpoch}", 'ss2': "FLUTTER_${DateTime.timestamp().millisecondsSinceEpoch}", }, ); } catch (e) { print(e); } setState(() {
}
@override Widget build(BuildContext context) {
} }
In app/build.gradle:
in android object changed sdk versions to:
After applying this solution and then running
Expected behavior
It is expected for logs to show up in this tab after I click the increment button which will dispatch an event of type
screen_view
just like in this screen, it only shows the user and no matter how many times I dispatch an event id doesn't workSample project
sample_project_google_analytics_bug.zip
Additional context
I tried to : β’ change the
firebase_core
andfirebase_analytics
versions to the lowest I could β’ I tried flutter clean β’ I tried to refresh, wait and debug the actual web console of google analytics β’ connected and disconnected to the internetI believe it has to do with the android implementation of the firebase_analytics plugin
Flutter doctor
Flutter dependencies
Click To Expand
``` Dart SDK 3.0.3 Flutter SDK 3.10.4 shit_2 1.0.0+1 dependencies: - cupertino_icons 1.0.6 - dio 5.4.0 [async http_parser meta path] - firebase_analytics 9.3.8 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_core 1.24.0 [firebase_core_platform_interface firebase_core_web flutter meta] - flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine] dev dependencies: - flutter_lints 2.0.3 [lints] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection js matcher material_color_utilities me ta source_span stream_channel string_scanner term_glyph] dependency overrides: - firebase_core_platform_interface 4.5.1 [collection flutter flutter_test meta plugin_platform_interface] transitive dependencies: - _flutterfire_internals 1.0.2 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - async 2.11.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - characters 1.3.0 - clock 1.1.1 - cloud_firestore_platform_interface 5.7.7 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 2.8.10 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - collection 1.17.1 - fake_async 1.3.1 [clock collection] - firebase_analytics_platform_interface 3.3.7 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.4.2+7 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_core_web 1.7.3 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - js 0.6.7 [meta] - lints 2.1.1 - matcher 0.12.15 [async meta stack_trace term_glyph test_api] - material_color_utilities 0.2.0 - meta 1.9.1 - path 1.8.3 - plugin_platform_interface 2.1.8 [meta] - sky_engine 0.0.99 - source_span 1.9.1 [collection path term_glyph] - stack_trace 1.11.0 [path] - stream_channel 2.1.1 [async] - string_scanner 1.2.0 [source_span] - term_glyph 1.2.1 - test_api 0.5.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - typed_data 1.3.2 [collection] - vector_math 2.1.4 ```