来自iOS的Firebase Analytics事件没有显示出来 [英] Firebase Analytics events from iOS not showing up

查看:1244
本文介绍了来自iOS的Firebase Analytics事件没有显示出来的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试新推出的Google Firebase,并实施了远程通知和崩溃报告。然而,我在分析工作方面遇到了巨大的问题。



使用 FIRAnalytics.logEventWithName(...)并用 FIRAnalytics.setUserPropertyString(...)保存用户pproperties。但是,无论我做什么,都不会在Firebase Analytics控制台中显示任何数据。



好的,我确实收到了一些事件,但这些事件不是由我发送的 first_open session_start )。此外,这些数据似乎在很长一段时间后才会下降。此外,当我跟踪事件并保存用户数据时,我收到以下内容:$ / $> $ $ $ $ $ $ $ $ <$> b
$ b

计划执行的上传任务约为(s):3102.294599890709



这似乎很奇怪 - 在发送下一批数据之前,Firebase等了将近一个小时, ,还是可配置?当我等待这么长时间的延迟,数据被发送了,但是并没有显示出来。 解决方案

Firebase事件是批量处理的一起上传,每小时上传一次,以防止设备上的电量消耗过多。在iOS上,当您在1h上传目标之前后台应用程序时,此时将在后台调度事件。

您可以启用iOS的调试日志记录( https ://firebase.google.com/docs/analytics/ios/events#view_events_in_the_xcode_debug_console )来查看事件何时上载到调试控制台。



事件上传时间延迟大约3小时,数据将显示在Firebase Analytics仪表板中。此外,默认的日期范围排除今天,所以你只能看到昨天的事件。如果您希望看到最新的事件,则可以将日期选择器切换到今天。

延迟/批量数据上传的主要原因是为了节省电量。每次使用网络时,设备移动网络调制解调器都会进入高功率模式,并保持这种模式一段时间。如果定期使用网络,则会严重影响电池寿命。通过一起批量上传并延迟上传,对电池的影响显着降低。

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.

解决方案

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.

这篇关于来自iOS的Firebase Analytics事件没有显示出来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆