[英]How to get the event count for the current Android user using Fabric's Answers or Google Analytics?
I have an app logging a custom event into Fabric's Answers as follows:我有一个应用程序将自定义事件记录到 Fabric 的答案中,如下所示:
Answers.getInstance().logCustom(new CustomEvent("AnEvent");
Using Answers API for apps, is it possible to query the total number of occurences of this event for the current user ?使用应用程序的 Answers API,是否可以查询当前用户此事件的总发生次数?
If not possible with Answers, is it possible with Google Analytics for Firebase ?如果使用 Answers 无法实现,是否可以使用 Google Analytics for Firebase ?
I had run into the same problem.我遇到了同样的问题。 It appears this will now need to be done with Firebase Analytics and not the new crashlytics within Firebase.看来这现在需要使用 Firebase Analytics 来完成,而不是 Firebase 中的新 crashlytics。
I previously was logging when a user got a new level in my game with the following code.我以前在用户使用以下代码在我的游戏中获得新级别时进行记录。
var levelName : String = "level 2"
Answers.getInstance().logLevelStart(LevelStartEvent().putLevelName(levelName)
The way I have migrated this to Firebase Analytics is with the following code.我将其迁移到 Firebase Analytics 的方式是使用以下代码。
var firebaseAnalytics : FirebaseAnalytics = FirebaseAnalytics.getInstance(activity)
val params = Bundle()
params.putString(FirebaseAnalytics.Param.ITEM_NAME, "Level " + Game.State.gameLevel)
firebaseAnalytics.logEvent(LEVEL_START, params)
Below is the list of Fabric terms translate to Firebase Analytics以下是转换为 Firebase Analytics 的 Fabric 术语列表
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.