当前位置: 首页 > 知识库问答 >
问题:

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

杜俊楚
2023-03-14
    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: 9452
09-19 14:22:15.364 I/FA      ( 3313): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
09-19 14:22:15.364 D/FA      ( 3313): Debug logging enabled
09-19 14:22:15.365 D/FA      ( 3313): AppMeasurement singleton hash: 233567450
09-19 14:22:15.383 V/FA      ( 3313): Collection enabled
09-19 14:22:15.383 V/FA      ( 3313): App package, google app id: com.prabhu.test, 1:64059382301:android:4262dc7062227fc8
09-19 14:22:15.393 V/FA      ( 3313): Registered activity lifecycle callback
09-19 14:22:15.403 V/FA      ( 3313): Using measurement service
09-19 14:22:15.404 V/FA      ( 3313): Connecting to remote service
09-19 14:22:15.433 V/FA      ( 3313): onActivityCreated
09-19 14:22:15.529 I/FA      ( 3313): Tag Manager is not found and thus will not be used
09-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 service
09-19 14:22:15.530 V/FA      ( 3313): Connection attempt already in progress
09-19 14:22:15.532 D/FA      ( 3313): Logging event (FE): view_item, Bundle[{item_name=Custom screen name, _o=app, item_category=Custom  screen}]
09-19 14:22:15.532 V/FA      ( 3313): Using measurement service
09-19 14:22:15.532 V/FA      ( 3313): Connection attempt already in progress
09-19 14:22:15.532 V/FA      ( 3313): Activity resumed, time: 273496560
09-19 14:22:15.698 D/FA      ( 3313): Connected to remote service
09-19 14:22:15.698 V/FA      ( 3313): Processing queued up service tasks: 3
09-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, 79
09-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, _o=app, content_type=image, item_id=1}]}
09-19 14:22:16.168 V/FA-SVC  (10602): Upload scheduled in approximately ms: 2557230
09-19 14:22:16.171 V/FA-SVC  (10602): Background event processing time, ms: 423
09-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, name, data size: view_item, 84
09-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, _o=app, item_category=Custom  screen}]}
09-19 14:22:16.212 V/FA-SVC  (10602): Upload scheduled in approximately ms: 2557187
09-19 14:22:16.215 V/FA-SVC  (10602): Background event processing time, ms: 44
09-19 14:22:20.723 V/FA      ( 3313): Inactivity, disconnecting from AppMeasurementService
09-19 14:22:22.384 V/FA      ( 3313): Activity paused, time: 273503415
09-19 14:22:23.515 V/FA      ( 3313): onActivityCreated
09-19 14:22:23.531 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:23.531 V/FA      ( 3313): Using measurement service
09-19 14:22:23.531 V/FA      ( 3313): Connecting to remote service
09-19 14:22:23.539 D/FA      ( 3313): Logging event (FE): view_item, Bundle[{item_name=Custom screen name, _o=app, item_category=Custom  screen}]
09-19 14:22:23.539 V/FA      ( 3313): Using measurement service
09-19 14:22:23.539 V/FA      ( 3313): Connection attempt already in progress
09-19 14:22:23.539 V/FA      ( 3313): Activity resumed, time: 273504562
09-19 14:22:23.594 D/FA      ( 3313): Connected to remote service
09-19 14:22:23.594 V/FA      ( 3313): Processing queued up service tasks: 2
09-19 14:22:23.602 V/FA-SVC  (10602): Saving event, name, data size: select_content, 79
09-19 14:22:23.603 V/FA-SVC  (10602): Event recorded: Event{appId='com.prabhu.test', name='select_content', params=Bundle[{item_name=test name, _o=app, content_type=image, item_id=1}]}
09-19 14:22:23.630 V/FA-SVC  (10602): Upload scheduled in approximately ms: 2549768
09-19 14:22:23.632 V/FA-SVC  (10602): Background event processing time, ms: 35
09-19 14:22:23.632 V/FA-SVC  (10602): Logging event: origin=app,name=view_item,params=Bundle[mParcelledData.dataSize=176]
09-19 14:22:23.636 V/FA-SVC  (10602): Saving event, name, data size: view_item, 84
09-19 14:22:23.636 V/FA-SVC  (10602): Event recorded: Event{appId='com.prabhu.test', name='view_item', params=Bundle[{item_name=Custom screen name, _o=app, item_category=Custom  screen}]}
09-19 14:22:23.648 V/FA-SVC  (10602): Upload scheduled in approximately ms: 2549750
09-19 14:22:23.651 V/FA-SVC  (10602): Background event processing time, ms: 18
09-19 14:22:26.687 V/FA      ( 3313): Session started, time: 273507718
09-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, name, data size: _s, 19
09-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: 2546644
09-19 14:22:26.757 V/FA-SVC  (10602): Background event processing time, ms: 48
09-19 14:22:31.717 V/FA      ( 3313): Inactivity, disconnecting from AppMeasurementService
09-19 14:24:23.422 V/FA      ( 3313): Activity paused, time: 273624439
09-19 14:24:24.423 D/FA      ( 3313): Application backgrounded. Logging engagement
09-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 service
09-19 14:24:24.428 V/FA      ( 3313): Connecting to remote service
09-19 14:24:24.444 D/FA      ( 3313): Connected to remote service
09-19 14:24:24.444 V/FA      ( 3313): Processing queued up service tasks: 1
09-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, name, data size: _e, 30
09-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: 2428898
09-19 14:24:24.505 V/FA-SVC  (10602): Background event processing time, ms: 56
09-19 14:24:29.455 V/FA      ( 3313): Inactivity, disconnecting from AppMeasurementService

共有1个答案

司空坚
2023-03-14

看看日志:

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

2557230 ms表示42分钟37秒

此外,他们似乎定期生成报告,但不是实时的。

您可以在Firebase控制台仪表板中查看事件的聚合统计信息。这些仪表板全天定期更新。对于立即测试,请使用上一节所述的logcat输出。

更新:

请参阅Firebase Analytics产品经理Steve Ganem的回答:

目前无法手动覆盖这些设置。然而,我们认识到需要看到你更快地报告,我们希望尽快解决这一需要。

11-04 14:46:14.112 V/FA      (24746): Upload scheduled in approximately ms: 9028
 类似资料:
  • 我有一个简单的项目使用QUUKUS 1.4.2。当我使用@Valid注释时,验证失败,状态为500,异常不会在控制台上显示。仅在Swagger UI中。我应该怎么做才能在控制台上打印出来? 正在发生的例外情况是: 错误是正确的。只是没有显示在控制台上。

  • 我在SpringBoot api上工作,并使用具有以下属性设置的H2数据库。 当我想使用浏览器通过'http://localhost:8082/h2-console'查看H2数据库控制台时,浏览器中打开了一个带有连接和测试连接按钮的屏幕。当我单击Test Connection时,它返回成功,但当单击Connect按钮时,出现错误,即localhost拒绝连接。

  • 问题内容: 从Python控制台显示或图片的最简单方法是什么? 我有一个Python控制台程序正在检查一个数据集,该数据集包含到本地存储的图像的链接。我应该如何编写脚本以便显示图像弹出的图形窗口? 问题答案: 使用很棒的枕头库: 这将在默认图像查看器中打开图像。

  • 当然,对于GUI,除非运行我上面提到的命令,否则不会加载控制台,所以如果您有很多打印语句,它是否仍然影响程序的速度,它们是否仍然打印?(即使认为没有显示终端/控制台)

  • 在freemarker上多次尝试工作后,我切换到thymeleaf,也面临同样的问题。当返回html文件时,它只是一个字符串值,而不是模板文件夹中的html文件。 当我在他们的控制台上观看youtube thymeleaf视频时,我不知道为什么它甚至不能在控制台中启动。 这是main/resources/templates中的html文件 POM. xml