Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Firebase Analytics Events missing

I am attempting to publish events via FlutterAnalytics but I am experiencing very sporadic behaviour.

  1. Using latest firebase_core and firebase_analytics packages
  2. Using Firebase project on PAYG Blaze plan
  3. Add pushing of events to BigQuery
  4. Using vanilla flutter create project for testing
  5. Downloaded and added google-services.json to android/app and android/app/debug folder
  6. Added firebaseAnalytics.logEvent(name: 'testevent'); in onPressed where counter is incremented
  7. Click button until counter reaches 100

Expect to see 100 events in Firebase Analytics but I see none.

  1. Look in StreamView, after 5 minutes a part of them show up, alongside the automatically collected screen_view etc.
  2. Look in DebugView (after activating adb) they show up instantly.
  3. Look in Events tab, nothing
  4. Look in BigQuery, nothing, not even tables created

They say events don't show up instantly, wait up to 24h, okay:

  1. Wait 24h, no event in Events tab beyond the automatically collected ones
  2. No BigQuery table generated
  3. Wait 48h, no event showing up.

I then proceeded to create several other test firebase projects, with varying degrees of events showing up:

  1. One project has 12 events out of 100 in BigQuery and 100 in Events tab
  2. Another project has no events
  3. Another project has 27 events in Events tab and 12 in BigQuery

Is anybody getting better mileage out of Firebase Analytics ? It cannot be a misconfiguration on my part on a vanilla project as then no events would show up, not this sporadic behaviour across all the projects.

like image 648
Cris B Avatar asked Nov 07 '22 16:11

Cris B


1 Answers

since you are seeing varying levels of events logged, we need to determine if each of the event is sent to the server for processing. this can be checked by enabling the verbose mode.

adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC

This will help you to verify if the event is logged or not immediately instead of waiting for 24-48 hours for the UI to show that.

If the events are not logged in the verbose mode, then you might want to rephrase your code to send 100 sequential events, if that is required. Another thought is like lots of same events from same user, are so quick and so they are packaged together for processing resulting in various count. ALways do verbose mode to ensure your events are created and sent as you wanted to analyze further.

like image 85
yoga Avatar answered Nov 15 '22 07:11

yoga