如何在Firebase事件分析中查看捆绑包参数 [英] How to view Bundle Parameter in Firebase Event Analytics

查看:100
本文介绍了如何在Firebase事件分析中查看捆绑包参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在4个不同的片段中有一个独特的按钮.这些独特的按钮在所有这些片段中都具有相似的功能,但稍有调整.

I have a unique button in 4 different fragments. These unique buttons do similar stuff in all of these fragments, but with a little tweak.

由于所有这些事情都是相似的,因此我将它们以事件名称"unique_btn_click_event"记录在一起

Since all of these things are similar, i log them together under the event name "unique_btn_click_event"

val eventName = "unique_btn_click_event"
val eventBundle = Bundle()

eventBundle.putString("fragment_name", fragmentName)
eventBundle.putString("unique_stuff_1", uniqueStuff1)
eventBundle.putString("unique_stuff_2", uniqueStuff2)
eventBundle.putString("qty_selected", quantity)

FirebaseAnalytics.getInstance(context).logEvent(eventName, eventBundle)

我的目标是测量哪个片段使用唯一按钮的次数最多,以便我可以对此进行优化并可能弃用其他按钮.

My Objective is to measure which fragment uses the unique button the most, so that i can optimize for that and possibly deprecate others.

尽管事件 unique_btn_click_event 被记录下来,但我看不到已记录的bundle参数的历史记录.我单击 fab_actions 事件:

Although the event unique_btn_click_event, gets logged but i can not see the history of bundle parameter that i have logged. I click on the fab_actions event:

在出现的下一页中,没有地方可以查看这些捆绑包,即使按计数也是如此.

In the next page that appears, there is no place where i can view these bundles, even by number of count.

我得到的最接近的是: StreamView :旨在仅显示实时包数据.实时很酷,但是不能用来做出质量决定.

The closest i get is: StreamView : Which is designed to show only real time bundle data. Real time is cool, but it can not be used to make quality decision.

我点击流视图".

我点击趋势,然后点击事件

我看到了实时分发包日志数据的列表.

I see a list of realtime bundle log data.

如何查看日志历史记录的操作计数.

How can i view action count of log history.

我如何嵌套事件.

推荐答案

为了在Firebase Analytics控制台上查看您的事件参数自定义指标,您需要将其添加到事件中.此链接将为您提供添加事件参数自定义指标所需的步骤:

In order to see your event parameters custom metrics on the Firebase Analytics Dashboard, you need to add them in your events. This Link will give you the steps you need to follow to add the event parameters custom metrics: Add Custom Dimensions and metrics in Firebase Analytics Reporting

总结步骤:

  1. 转到Firebase Analytics仪表板上 Analytics(分析)部分下的自定义定义菜单
  2. 在这里,您将看到2个标签:自定义维度自定义指标.仅作概述,如果您以前使用过Firebase Analytics,则自定义维度类似于用户属性,而自定义指标则类似于事件参数.发生的变化是Firebase现在在自定义定义和指标中添加了一个名为 Scope 的过滤器,该过滤器将确定是使用用户属性还是事件参数来跟踪数据.
  3. 如果仅想使用事件参数(在撰写本文时),请
  4. 选择自定义指标.如果要使用用户属性,请选择自定义维度,因为您可以在此处选择两个范围.
  5. 要添加新的用户属性/事件参数,请点击创建自定义维度(如果您已选择自定义定义)或创建自定义指标(如果您选择了自定义指标).
  6. 在下一个窗口中,输入您的维度/指标名称(取决于您在上一步中选择的内容),描述范围(仅适用于自定义尺寸).
  7. 如果范围是事件,则只能设置事件参数;如果范围是 User ,则只能选择用户属性.在我们的情况下,我们必须使用事件参数,因此作用域应为事件.
  8. 如果您创建了自定义指标,则还可以选择设置度量单位.截至目前,我们有以下选择:
    • 标准(无单位)
    • 货币
    • 距离(英尺,英里,米,公里)
    • 时间(毫秒,秒,分钟,小时)
  1. Go to Custom Definitions menu under Analytics section on the Firebase Analytics dashboard
  2. Here, you will see 2 tabs: Custom dimensions and Custom metrics. Just to give an overview, custom dimensions are similar to user properties and custom metrics are similar to event parameters if you have worked with Firebase Analytics before. What has changed is that Firebase has now added a filter called Scope inside custom definitions and metrics that will determine whether to use user properties or event parameters to track the data.
  3. Select Custom metrics if you want to work only with event parameters (as of the time of this writing). If you want to work with user properties, then select Custom dimensions as here you can select both scopes.
  4. For adding new user properties/event parameters, click on Create custom dimensions (if you have selected Custom definitions) or Create custom metrics (if you have selected Custom metrics).
  5. In the next window, enter your Dimension/Metric name (depending on what you have selected in the previous step), Description, Scope (only available for Custom dimensions).
  6. If the scope is Event, then you can only set Event parameter and if the scope is User, then you only select User property. In our case, we have to work with event parameters so the scope should be Event.
  7. If you have created a custom metric, then you will also get an option to set the Unit of measurement. As of now, we have the following options:
    • Standard (No Unit)
    • Currency
    • Distance (Feet, Miles, Meters, Kilometers)
    • Time (Milliseconds, Seconds, Minutes, Hours)

为了查看事件中使用的参数列表,您需要选择Analytics(分析)仪表板上事件"选项卡旁边的参数报告"选项卡.

In order to see the list of parameters used in your events, you need to select the Parameter Reporting tab next to the Events tab on the Analytics Dashboard.

一旦跟踪了足够的数据,您将在事件"页面本身上看到事件参数的值.

Once you have enough tracked data, you will see the values of the event parameters on the Events page itself.

关于获取实时事件跟踪,您需要使用 Debug View 来实时跟踪事件.为了在Android版Firebase Analytics中启用调试功能,您需要使用ADB运行以下命令:

As for getting real-time event-tracking, you need to use Debug View to track your events in real-time. In order to enable debugging in Firebase Analytics for Android, you need to run the following commands using ADB:

在IDE中启用调试

adb shell setprop log.tag.FA VERBOSE

在Firebase Analytics的调试视图中启用调试

adb shell setprop debug.firebase.analytics.app <your_app_package_name>

注意::用您的应用程序包名称替换< your_app_package_name> (不带<>).示例: com.example.uniquepackagename

NOTE: Substitute <your_app_package_name> (without the <>) with the package name of your application. Example: com.example.uniquepackagename

如上所述,您将在事件部分的现有事件表中获得事件操作计数的日志.

You will get the log of your event action count in the Existing events table in the Events section as mentioned above.

最后,对于嵌套事件,我认为Firebase Analytics当前不直接支持该功能.但是,您可以在应用程序中使用自定义用户"属性按用户属性"对事件进行分组.用户属性可以用作过滤器,以按用户属性过滤事件.以下是可让您开始使用User Property的链接:在Firebase中使用用户属性

Lastly, for nesting events, I don't think Firebase Analytics currently supports that directly. However, you can use Custom User properties in your application to group the events by a User Property. User properties can be used as filters to filter events by a user property. Here is a link to get you started on User Property: Work with User Properties in Firebase

在Android应用中设置用户属性后,您还需要将其添加到Firebase Analytics仪表板中.我已经在上述步骤中介绍了这一点.用户属性的名称必须与您在应用程序中使用的名称完全相同.

After setting the user properties in your Android app, you need to add them in the Firebase Analytics dashboard as well. I have already covered this in the steps mentioned above. The name of the user property needs to be exactly the same as the name you are using in your app.

注意::设置用户属性后,即使未明确设置,该属性也将保留在您发送的其他事件中.因此,在设置用户属性时要小心,因为在某些事件中您可能不需要它们.

NOTE: Once you set a user property, it will persist in further events that you send even if you don't set it explicitly. So be careful while setting user properties as you may not need them in some events.

我希望这可以帮助您解决Firebase Analytics中的事件.

I hope this helps you in your issue with events in Firebase Analytics.

看来Google已更新了Firebase控制台.现在,我们有了自定义定义(GA4),而不是用户属性,并且在其中有了自定义定义和指标,类似于旧的Google Analytics(分析)跟踪.

It seems Google has updated the Firebase console. Now we have custom definitions (GA4) instead of user properties and inside that we have custom definitions and metrics, which is similar to the old Google Analytics tracking.

我在过时的地方更新了以上答案.我在几个地方从以前的回答中打了几句话,以防万一您来自旧的Firebase Analytics实施,您将知道在何处进行了更改.

I have updated my above answer in places that were outdated. I have striken some words from my previous answer in a few places so that in case you are coming from the old Firebase Analytics implementation, you will know where the changes were made.

请检查并希望对您有帮助.

Please check and hope it helps.

此致

Aj

这篇关于如何在Firebase事件分析中查看捆绑包参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆