I have set up Google Analytics with in my flutter app. It all seems to be working as standard, with data coming through and being displayed on the analytics console screen, showing users, events count that sort of thing.
I see the default events are: user_engagement, screen_view, session_start, first_open, app_remove, app_clear_data.
These are all having event count data coming through fine. I want to set up my own custom event within the flutter app. I have tried this...
_sendAnalyticsEvent() async {
FirebaseAnalytics analytics = FirebaseAnalytics();
await analytics.logEvent(
name: "save_plant",
parameters: <String, dynamic>{
'plant_name': currentPlant.name,
'plant_species': currentPlant.species,
'plant_group': currentPlant.group,
'new_plant': widget.newPlant
},
);
}
... but nothing seems to be coming through on the events. Am I missing something here with doing custom events with a flutter app? I have the google-services.json file correctly in the android app directory.
When You log an event with FirebaseAnalytics
, it takes up to 24 hours to get it available in the Events
dashboard.
If You want to test "real time" logging, You should try the Debug View (link).
After You set it up for a specific device (there are two easy steps, check it out here), You will see each event only a few seconds after You log it from Your app, in the DebugView
section.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With