简体   繁体   English

确认Firebase Analytics跟踪

[英]Confirmation of Firebase Analytics tracking

I have this code in my Android app in a fragment 我在我的Android应用中有一段代码

 public class CreateRequest extends Fragment {

    private FirebaseAnalytics mFireBaseAnalytics;        

    String titleStr = "title";
    String descriptionStr = "description";
    Int totalTime = 10;

    Bundle params = new Bundle();
    params.putString("Title", titleStr);
    params.putString("Description", descriptionStr);
    params.putInt("TimeInMinutes",totalTime);
    mFireBaseAnalytics.logEvent("created_request", params);

}

The code runs fine and throws no errors, but after waiting 24 hours I don't see anything in the Firebase console. 该代码运行良好,没有任何错误,但是等待24小时后,我在Firebase控制台中看不到任何内容。 This SO questions Firebase Analytics demographics states that some data is only shown after 10 users have used the app. 因此, Firebase Analytics的人口统计数据表明,只有10个用户使用该应用程序后,才会显示某些数据。 Is this true with the code I've provided above? 我上面提供的代码是否正确? Any insight would be greatly appreciated. 任何见识将不胜感激。

After your code you can use Log events. 代码完成后,您可以使用Log事件。 You can enable verbose logging with a series of commands PDA: 您可以使用一系列命令PDA启用详细日志记录:

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

In addition to enabling verbose logging you can also enable debug mode for your app. 除了启用详细日志记录之外,您还可以为应用程序启用调试模式。 Debug mode will upload data right away after logging an event. 记录事件后,调试模式将立即上传数据。

To enable debug mode set the following properties with adb (replace with the package of your app): 要启用调试模式,请使用adb设置以下属性(替换为应用程序的软件包):

adb shell setprop debug.firebase.analytics.app "<YOUR_APP_PACKAGE>"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM