Android Firebase Analytics事件不会显示在控制台上

Android Firebase Analytics事件不会显示在控制台上,第1张

概述我在我的android项目中集成了firebase分析.我正在尝试捕获屏幕访问事件. Bundle params = new Bundle(); params.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, 'Custom screen'); params.putString(Fire

我在我的android项目中集成了firebase分析.我正在尝试捕获屏幕访问事件.

    Bundle params = new Bundle();    params.putString(FirebaseAnalytics.Param.ITEM_category,"Custom  screen");    params.putString(FirebaseAnalytics.Param.ITEM_name,"Custom screen name");    mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.VIEW_ITEM,params);

我也尝试使用此代码从谷歌示例项目

    Bundle bundle = new Bundle();    bundle.putString(FirebaseAnalytics.Param.ITEM_ID,"1");    bundle.putString(FirebaseAnalytics.Param.ITEM_name,"test name");    bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE,"image");    mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT,bundle); 

我的调试日志显示事件已成功发布.

09-19 14:22:15.364 I/FA      ( 3313): App measurement is starting up,version: 945209-19 14:22:15.364 I/FA      ( 3313): To enable deBUG logging run: adb shell setprop log.tag.FA VERBOSE09-19 14:22:15.364 D/FA      ( 3313): DeBUG logging enabled09-19 14:22:15.365 D/FA      ( 3313): AppMeasurement singleton hash: 23356745009-19 14:22:15.383 V/FA      ( 3313): Collection enabled09-19 14:22:15.383 V/FA      ( 3313): App package,Google app ID: com.prabhu.test,1:64059382301:androID:4262dc7062227fc809-19 14:22:15.393 V/FA      ( 3313): Registered activity lifecycle callback09-19 14:22:15.403 V/FA      ( 3313): Using measurement service09-19 14:22:15.404 V/FA      ( 3313): Connecting to remote service09-19 14:22:15.433 V/FA      ( 3313): onActivityCreated09-19 14:22:15.529 I/FA      ( 3313): Tag Manager is not found and thus will not be used09-19 14:22:15.529 D/FA      ( 3313): Logging event (FE): select_content,Bundle[{item_name=test name,_o=app,content_type=image,item_ID=1}]09-19 14:22:15.530 V/FA      ( 3313): Using measurement service09-19 14:22:15.530 V/FA      ( 3313): Connection attempt already in progress09-19 14:22:15.532 D/FA      ( 3313): Logging event (FE): vIEw_item,Bundle[{item_name=Custom screen name,item_category=Custom  screen}]09-19 14:22:15.532 V/FA      ( 3313): Using measurement service09-19 14:22:15.532 V/FA      ( 3313): Connection attempt already in progress09-19 14:22:15.532 V/FA      ( 3313): Activity resumed,time: 27349656009-19 14:22:15.698 D/FA      ( 3313): Connected to remote service09-19 14:22:15.698 V/FA      ( 3313): Processing queued up service tasks: 309-19 14:22:15.751 V/FA-SVC  (10602): Logging event: origin=app,name=select_content,params=Bundle[mParcelledData.dataSize=168]09-19 14:22:15.766 V/FA-SVC  (10602): Saving event,name,data size: select_content,7909-19 14:22:15.768 V/FA-SVC  (10602): Event recorded: Event{appID='com.prabhu.test',name='select_content',params=Bundle[{item_name=test name,item_ID=1}]}09-19 14:22:16.168 V/FA-SVC  (10602): Upload scheduled in approximately ms: 255723009-19 14:22:16.171 V/FA-SVC  (10602): Background event processing time,ms: 42309-19 14:22:16.171 V/FA-SVC  (10602): Logging event: origin=app,name=vIEw_item,params=Bundle[mParcelledData.dataSize=176]09-19 14:22:16.175 V/FA-SVC  (10602): Saving event,data size: vIEw_item,8409-19 14:22:16.175 V/FA-SVC  (10602): Event recorded: Event{appID='com.prabhu.test',name='vIEw_item',params=Bundle[{item_name=Custom screen name,item_category=Custom  screen}]}09-19 14:22:16.212 V/FA-SVC  (10602): Upload scheduled in approximately ms: 255718709-19 14:22:16.215 V/FA-SVC  (10602): Background event processing time,ms: 4409-19 14:22:20.723 V/FA      ( 3313): Inactivity,disconnecting from AppMeasurementService09-19 14:22:22.384 V/FA      ( 3313): Activity paused,time: 27350341509-19 14:22:23.515 V/FA      ( 3313): onActivityCreated09-19 14:22:23.531 D/FA      ( 3313): Logging event (FE): select_content,item_ID=1}]09-19 14:22:23.531 V/FA      ( 3313): Using measurement service09-19 14:22:23.531 V/FA      ( 3313): Connecting to remote service09-19 14:22:23.539 D/FA      ( 3313): Logging event (FE): vIEw_item,item_category=Custom  screen}]09-19 14:22:23.539 V/FA      ( 3313): Using measurement service09-19 14:22:23.539 V/FA      ( 3313): Connection attempt already in progress09-19 14:22:23.539 V/FA      ( 3313): Activity resumed,time: 27350456209-19 14:22:23.594 D/FA      ( 3313): Connected to remote service09-19 14:22:23.594 V/FA      ( 3313): Processing queued up service tasks: 209-19 14:22:23.602 V/FA-SVC  (10602): Saving event,7909-19 14:22:23.603 V/FA-SVC  (10602): Event recorded: Event{appID='com.prabhu.test',item_ID=1}]}09-19 14:22:23.630 V/FA-SVC  (10602): Upload scheduled in approximately ms: 254976809-19 14:22:23.632 V/FA-SVC  (10602): Background event processing time,ms: 3509-19 14:22:23.632 V/FA-SVC  (10602): Logging event: origin=app,params=Bundle[mParcelledData.dataSize=176]09-19 14:22:23.636 V/FA-SVC  (10602): Saving event,8409-19 14:22:23.636 V/FA-SVC  (10602): Event recorded: Event{appID='com.prabhu.test',item_category=Custom  screen}]}09-19 14:22:23.648 V/FA-SVC  (10602): Upload scheduled in approximately ms: 254975009-19 14:22:23.651 V/FA-SVC  (10602): Background event processing time,ms: 1809-19 14:22:26.687 V/FA      ( 3313): Session started,time: 27350771809-19 14:22:26.699 D/FA      ( 3313): Logging event (FE): _s,Bundle[{_o=auto}]09-19 14:22:26.709 V/FA-SVC  (10602): Logging event: origin=auto,name=_s,params=Bundle[mParcelledData.dataSize=36]09-19 14:22:26.738 V/FA-SVC  (10602): Saving event,data size: _s,1909-19 14:22:26.739 V/FA-SVC  (10602): Event recorded: Event{appID='com.prabhu.test',name='_s',params=Bundle[{_o=auto}]}09-19 14:22:26.754 V/FA-SVC  (10602): Upload scheduled in approximately ms: 254664409-19 14:22:26.757 V/FA-SVC  (10602): Background event processing time,ms: 4809-19 14:22:31.717 V/FA      ( 3313): Inactivity,disconnecting from AppMeasurementService09-19 14:24:23.422 V/FA      ( 3313): Activity paused,time: 27362443909-19 14:24:24.423 D/FA      ( 3313): Application backgrounded. Logging engagement09-19 14:24:24.427 D/FA      ( 3313): Logging event (FE): _e,Bundle[{_o=auto,_et=126732}]09-19 14:24:24.427 V/FA      ( 3313): Using measurement service09-19 14:24:24.428 V/FA      ( 3313): Connecting to remote service09-19 14:24:24.444 D/FA      ( 3313): Connected to remote service09-19 14:24:24.444 V/FA      ( 3313): Processing queued up service tasks: 109-19 14:24:24.450 V/FA-SVC  (10602): Logging event: origin=auto,name=_e,params=Bundle[mParcelledData.dataSize=60]09-19 14:24:24.480 V/FA-SVC  (10602): Saving event,data size: _e,3009-19 14:24:24.481 V/FA-SVC  (10602): Event recorded: Event{appID='com.prabhu.test',name='_e',params=Bundle[{_o=auto,_et=126732}]}09-19 14:24:24.500 V/FA-SVC  (10602): Upload scheduled in approximately ms: 242889809-19 14:24:24.505 V/FA-SVC  (10602): Background event processing time,ms: 5609-19 14:24:29.455 V/FA      ( 3313): Inactivity,disconnecting from AppMeasurementService

但是,在我的firebase分析控制台中,事件未显示.

请帮帮我,我错了什么?
仅供参考,对于同一Google Firebase Analytics项目,会从IOS应用中显示事件.最佳答案看看日志:

09-19 14:22:16.168 V/FA-SVC  (10602): Upload scheduled in approximately ms: 2557230

2557230 ms表示42分37秒

然后他们似乎定期生成报告,但不是实时报告.

https://firebase.google.com/docs/analytics/android/events

You can vIEw aggregrated statistics about your events in the Firebase
console dashboards. These dashboards update periodically throughout
the day. For immediate testing,use the logcat output as described in
the prevIoUs section.

更新:

请参阅Firebase Analytics产品经理Steve Ganem的this answer:

There is currently no way to manually overrIDe these settings.
However,we recognize the need to see your reporting more quickly and
we hope to address this need soon.

但是,在同一个线程中,Yoxi通过清除应用程序数据更快地找到了通往force initial upload的方法.我只是做了自己,我可以看到初始上传.但这似乎不会使Firebase控制台中的数据更快显示出来.

11-04 14:46:14.112 V/FA      (24746): Upload scheduled in approximately ms: 9028
总结

以上是内存溢出为你收集整理的Android Firebase Analytics事件不会显示在控制台上全部内容,希望文章能够帮你解决Android Firebase Analytics事件不会显示在控制台上所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1139422.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-31
下一篇 2022-05-31

发表评论

登录后才能评论

评论列表(0条)

保存