如何在Firebase控制台中查看事件参数

57

我刚开始使用Firebase进行应用程序分析,但在尝试查看与我的事件相关联的参数时遇到了一些问题。登录控制台后,选择我的应用程序,然后选择版本,接着会出现仪表盘。这一切看起来都很好。然后我选择选项卡,看到了我的应用程序记录的所有事件列表。同样,这一切都很好。但是,我希望能够深入挖掘,并查看基于这些事件传递的参数生成的报告。在我的iOS代码中,我有以下内容:

[FIRAnalytics logEventWithName:kFIREventSelectContent parameters:@{
    kFIRParameterItemID:@"some_item_id",
    kFIRParameterContentType:@"some_content_type"
}];

我希望能够看到特定“content_type”的“select_content”事件的数量。但我不知道如何做到这一点。

我尝试创建一个使用我几天前测试过的“content_type”的“Audience”,但我的用户人数始终为0。所以我很困惑...你怎么能根据提供的参数看到事件的分析数据?

5个回答

48
老实说,这里的答案一点也没帮到我。我最终发现你必须手动向每个事件添加自定义参数报告。这里是文档链接。

https://support.google.com/firebase/answer/7397304?hl=en&utm_id=ad&authuser=0

如果这个链接失效了,我猜我会在下面添加步骤。这只是从链接中复制粘贴的内容。

Custom-parameter reporting Define custom parameters for your events.

Google Analytics for Firebase lets you specify up to 25 custom parameters per event (Android or iOS).

You can also identify up to 50 custom event parameters per project (40 numeric and 10 textual) to include in reporting by registering those parameters with their corresponding events. Once you register your custom parameters, Google Analytics for Firebase displays a corresponding data card in each related event-detail report.

Each parameter that you specify counts toward the project limit of 50. For example, if you specify the same parameter for 3 different events, then that counts as 3 of your 50.

To register custom parameters for an event:

In Analytics for Firebase, navigate to your app.
Click Events.
In the row for the event you want to modify, click More > Edit parameter reporting.
In the Enter parameter name field, enter the name of the parameter you'd like to register.
If a match is found, select it in the list and click ADD.
If no match is found, click ADD.
Set the Type field to Text or Number. For numeric parameters, set the Unit of Measurement field.
Click SAVE, then click CONFIRM.

On the Events page, any event with registered parameters has a gray box next to the event name with the number of registered parameters for that event.

To edit registered parameters:

In the row for the event, click More > Edit parameter reporting.
Add new parameters per the instructions above, or click Delete to remove a parameter.
Click SAVE, then click CONFIRM.

The per-app count for registered parameters appears at the bottom of the list of parameters. As you enter parameters, the count updates. When the quota has been reached (50), that number appears in red, indicating that you cannot register any more.

When you register custom parameters, a data card for each parameter is added to the related event-detail report. However, it may take up to 24 hours for the data card to appear.


23
我无法在事件旁边看到“编辑参数报告”的选项。有什么想法吗? - Klemens Zleptnig
1
自定义参数报告已被“事件范围的自定义维度和指标”所取代 - https://support.google.com/analytics/answer/10075209 - omarojo
1
@omarojo 你知道如何使用这些新的维度吗?因为我在事件中看到我的旧参数,但我不知道如何添加新的参数。你如何将参数与事件关联起来? - Jan-Dawid Roodt
我相信你不会将它们关联起来,而是将它们作为自定义维度添加。然后它们应该会自动出现在每个事件页面上,你可以在那里查看图形等信息。 - omarojo
很遗憾,此选项已被移除。现在它是左侧窗格上名为“自定义定义”的单独页面。 - tasomaniac
显示剩余2条评论

25

现在要显示参数,您需要像这里写的那样配置指标或维度:https://support.google.com/analytics/answer/10075209

添加后等待24小时,您将看到如下内容:enter image description here 这里 shop_exit_app 是主要事件,shop_item 是该事件的一个参数

更新: 要添加参数,您只需使用以下内容:

logShopExitApp(shopItem?: ShopItem): void {
    firebase.analytics.logEvent({
      key: 'shop_exit_app',
      parameters: shopItem ? [
        {
          key: 'shop_item',
          value: shopItem.title,
        }
      ] : null,
    })
  }

4
这是一件全新的事情吗?我没有看到任何关于这个改变的通知,但我发现编辑参数报告不再存在了:/ - Blundering Philosopher
1
啊,好的,我看到了:“此功能正在被事件范围的自定义维度和指标所取代…” - Blundering Philosopher
@Henry 你好,抱歉打扰你了。你最近有没有弄清楚事件如何与参数连接的问题?我们在客户端一起发送这两个东西,并创建了这个新维度,但我不知道它们之间的联系。我们2天前创建了这个维度,我以为Firebase现在已经更新了,但你说你的要花一个星期? - Jan-Dawid Roodt
1
@Jan-DawidRoodt 老实说,我不太确定如何解决/使其工作。我只是按照 OP 的答案进行操作,但主要问题是报告需要很长时间才能在我的情况下检测到自定义参数。即使对于其他人来说只需要 24 小时,我的情况比那更长。 - Henry
维度和指标有什么区别?为了获得参数报告,应该使用哪一个? - tasqyn
显示剩余9条评论

23

谷歌似乎改变了一切,用他们糟糕的文档把我们都搞糊涂了。

今天 Firebase 控制台中有一个叫做“自定义定义”(Custom definitions)的东西,其中包含两个未记录的术语:“Dimensions” 和 “Metrics”。

在看完所有答案后,它们缺乏对这些术语的定义。您可以从客户端拥有自定义用户属性或记录自定义事件。要使它们有用,您需要确保分析为其生成报告(这将需要最多 24-48 小时)。

用户属性仅具有字符串值,而自定义事件具有字符串/数字的键值对。起初,我以为维度适用于用户属性,而指标适用于事件参数 - 这是错误的!这里的指标意味着数字!因此,指标适用于具有数值参数的自定义事件(您可以猜测这一点,因为在计量单位中没有“文本”选项),例如游戏得分。

而在维度方面,似乎同时适用于用户属性和事件。因此,当您在事件中具有非数字参数时,应将其定义为维度,否则报告无法为您工作,因为在指标中他们期望得到数字。所以像搜索词这样的东西应该被认为是维度。

谷歌在其文档示例这里中暗示了这一点:

您可以创建一个作者维度,它从 author 参数获取其值,并创建一个文章长度指标,它从 number_of_pages 参数获取其值。

在引用此自定义事件时:

gtag('event','read_article', {
    "author":"Bill Q",
    "title":"How to Build a Backpack",
    "number_of_pages":2,
});

注意事项:

  1. 您不能将参数集设置为指标和维度相同
  2. 我会更新当您将数字参数设置为维度时会发生什么

17

如果有人像我一样遇到困难,以下是我们的解决方法:

在左侧面板(其中显示事件、漏斗、受众等)中转到“自定义定义”。

点击“自定义指标”,它位于“自定义维度”的旁边,并单击“创建自定义指标”。 (由于某种原因,旧参数会进入“维度”,但当您创建事件/参数组合时,在“维度”中无法正常工作...我不知道为什么...)

然后请确保您的参数的拼写与您的代码中要求的“事件参数”完全相同,而其余字段则不重要。

请注意:更新需要24小时才能完成,请确保发送测试事件以激活它。


5
仪表盘中的参数在哪里看到? - penguru

8

看起来您正确记录了事件和参数。它应该生成一个类似附件的选择内容报告。您不需要创建受众即可查看此报告。

enter image description here


Steve,感谢您的回答。这看起来都很好;我如何使用“origin”和“destination”参数获得类似于“view_item_list”的东西? - themanatuf
1
并非所有的事件/参数都有报告。您可以使用这些参数创建受众群体,或者如果将应用程序链接到BigQuery,则可以在BigQuery中查看这些参数。 - Steve Ganem
再次感谢。我想我期望观众人数立即填充,但看起来并不是这样。我也会尝试使用BigQuery,再次感谢。 - themanatuf
5
@SteveGanem,您能否提供更多信息或链接,以便我可以查看哪些事件/参数具有类似于“SELECT_CONTENT”的附加报告。例如,对于“VIEW_ITEM”事件,Firebase控制台没有显示附加报告,尽管“item_id”,“item_name”和“item_category”参数具有值(根据文档所述是必需的参数)。 - Leszek
根据http://grokbase.com/t/gg/firebase-talk/165rhtrp76/firebase-where-can-i-see-the-data-of-the-parameters-in-the-events中的Leszek所说,他们将来会在控制台中为所有事件类型添加参数报告视图。我们需要等待...与此同时,BigQuery应该是答案。 - Kirill Karmazin
你能否按照其他参数(如“内容类型”)进行过滤? - 3366784

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接