Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Analytics events from iOS not showing up

I am testing the new Google-powered Firebase, and have implemented remote notifications and crash reporting. I am, however, having massive problems with getting Analytics to work.

I track events with FIRAnalytics.logEventWithName(...) and save user pproperties with FIRAnalytics.setUserPropertyString(...). However, no matter what I do, no data shows up in the Firebase Analytics Console.

Well, I do receive some events, but those are not sent by me (like first_open and session_start). Also, this data seems to drop in after a very long time.

Furthermore, when I track events and save user data, I receive the following:

Upload task scheduled to be executed in approx. (s): 3102.294599890709

This seems really strange - Firebase waiting almost an hour before trying to send the next batch of data must be a bug, or is it configurable? When I waited that extremely long delay out, data was sent...but does not show up.

like image 550
Daniel Saidi Avatar asked May 24 '16 14:05

Daniel Saidi


People also ask

How do I see events in Firebase Analytics?

View events in the dashboard You can access this data from the Events dashboard in the Firebase console. This dashboard shows the event reports that are automatically created for each distinct type of event logged by your app.

How long does it take for Firebase Analytics to update?

Your reports should refresh approximately every 4 hours. Just a hunch -- default ranges such as "Last 30 Days", "Last 7 days", etc.

Does Google Analytics for Firebase use cookies?

Firebase and Google Analytics use cookies and identifiers to collect and store the personal information of users. To comply with Firebase's Terms of Service, you must disclose in your Privacy Policy the use of cookies, identifiers for mobile devices, and third-party vendors to properly obtain consent.

How do I see all devices in Firebase Analytics?

You can see the device list in Firebase Analytics. In dashboard -> device model click in view device model. You can see list of all the devices with details.


1 Answers

Firebase events are batched together and uploaded once every hour in order to prevent excessive battery drain on the devices. On iOS when you background the app before the 1h upload target the events will be dispatched at this time in the background.

You can enable debug logging for iOS (https://firebase.google.com/docs/analytics/ios/events#view_events_in_the_xcode_debug_console) to see when events are uploaded in debug console.

Once the events are uploaded there is delay at about 3h before the data will show up in the Firebase Analytics dashboard. Also the default day range excludes "today" so you only see events from yesterday. You can switch the date picker to include Today if you like to see the latest events.

The main reason to delay/batch data uploading is to save battery. Each time the network is used the device mobile network modem is put in hi power mode and stay in this mode for a while. If network is used regularly it has sever impact on the battery life. By batching the uploads together and delaying the upload the impact on the battery is significantly reduced.

like image 122
djabi Avatar answered Sep 28 '22 11:09

djabi