【问题标题】:Firebase Analytics - How to add Screen Names and Log EventsFirebase Analytics - 如何添加屏幕名称和日志事件
【发布时间】:2018-10-22 17:10:46
【问题描述】:

我想将屏幕名称和日志事件添加到 Firebase 的分析中。我试过下面的代码,但在 Firebase 的控制台中看不到事件和屏幕名称。

//For Logging Event
Bundle bundle = new Bundle();
bundle.putString("custom_param",nameEditText.getText().toString());
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.GENERATE_LEAD, bundle);

//For Adding Screen Name
mFirebaseAnalytics.setCurrentScreen(this, "Visitor Entry", VisitorEntryActivity.class.getSimpleName());

我已经添加了 Firebase SDK。 我不知道具体需要做什么设置。提前致谢。

【问题讨论】:

  • 有时事件需要一些时间才能出现在 Firebase 控制台中。尝试添加多个条目并等待一段时间。
  • mark your device as a debug device,并在控制台中切换到调试视图以检查您的事件是否被正确记录。如果他们正在调试视图中登录,那么他们出现在其他设备上只是时间问题(如 Iffat 所说)。
  • 我们能否知道用户从特定小部件输入数据花了多少时间?例如,在输入 永久地址 时,我们有 EditText。那么我们怎么知道用户输入他/她的地址花了多少时间?@FrankvanPuffelen@IffatFatima

标签: android firebase firebase-analytics firebase-console


【解决方案1】:

MyActivity.java 下放

protected void onResume() {
    isActivityLive = true;
    super.onResume();
    analytics.setCurrentScreen(this, "Screen Name", this.getClass().getSimpleName());
}

【讨论】:

  • 现在在 Firebase 分析中显示屏幕名称。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-02-01
  • 1970-01-01
  • 1970-01-01
  • 2018-07-10
  • 2017-03-23
  • 2020-04-18
相关资源
最近更新 更多