Analytics自定义事件报告

Analytics自定义事件报告

本文介绍了控制台中的Android Firebase Analytics自定义事件报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

接受我的提前道歉,如果这是不正确的地方张贴这个问题,因为我不确定会是什么。



我所要做的是记录甚至可以使用Firebase分析工具在Firebase控制台中生成类似于 select_content 事件示例的报表。它触发如下:

  FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this); 
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_ID,ID);
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME,NAME);
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE,image);
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT,bundle);

更具体地说是 FirebaseAnalytics.Param.CONTENT_TYPE 可以是任何值,并将在控制台中产生一个报告,如下所示:



我创建自己的自定义事件为:

  Bundle params2 = new Bundle(); 
params2.putString(FirebaseAnalytics.Param.VALUE,Google Play游戏退出按钮);
mFirebaseAnalytics.logEvent(Main_Activity_Button_Pressed,params2);

并且下面显示的针对此事件生成的报告似乎没有考虑到我添加的值。





是否有可能完成我所要做的事情,如果是的话,这是什么正确的方式来实现这一点?

更新:似乎这是不可能的测试目的,因为我最近发现这一点: a href =https://i.stack.imgur.com/83k67.jpg>



这就解释了为什么我的自定义参数没有出现在控制台中。

解决方案

首先,赞助添加此项:

但是,我发现的是:




Accept my apologies in advance if this is the incorrect place to post this question as I am unsure what would be.

What I am trying to accomplish is to record a custom even using Firebase analytics that produces a similar report in the Firebase console to their example of the select_content event. It is triggered as follows:

    FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
    Bundle bundle = new Bundle();
    bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "ID");
    bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "NAME");
    bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "image");
    mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);

and more specifically the string after FirebaseAnalytics.Param.CONTENT_TYPE can be any value and will produce a report in the console as shown below:

I create my own custom events as:

Bundle params2 = new Bundle();
params2.putString(FirebaseAnalytics.Param.VALUE, "Google Play Games Sign out Button");
mFirebaseAnalytics.logEvent("Main_Activity_Button_Pressed", params2);

and the report produced for this event shown below does not appear to take into account the value I have added.

Is it possible to accomplish what I am trying to do, and if so what is the correct way to implement this?

Update: Seems this is not possible for testing purposes as I recently discovered this:

which explains why my custom parameters do not appear in the console.

First, credit to AdamK for adding this:

But, something I discovered is:

which would explain why my custom parameters do not appear as I am the only tester.

这篇关于控制台中的Android Firebase Analytics自定义事件报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 17:57