如何从 Firebase 控制台查看事件参数
How to view event parameters from Firebase console
我刚刚开始使用 Firebase 进行应用分析,但在尝试查看与我的事件关联的参数时遇到了一些问题。登录到控制台后,select 访问我的应用程序,然后我 select iOS
版本,我会看到仪表板。所有这些看起来都不错。然后我 select Events
选项卡,我看到我的应用程序记录的所有事件的列表。同样,这一切都很好。但是,我希望能够根据随这些事件传递的参数向下钻取并查看报告。在我的 iOS 代码中,我有以下内容:
[FIRAnalytics logEventWithName:kFIREventSelectContent parameters:@{
kFIRParameterItemID:@"some_item_id",
kFIRParameterContentType:@"some_content_type"
}];
我想知道有多少 "select_content" 事件来自特定的 "content_type"。但我不知道该怎么做。
我尝试使用几天前测试过的 "content_type" 创建一个 Audience
,但我的用户数始终为 0
。所以我不知所措......你怎么看基于提供的参数的事件分析?
您似乎正在记录正确的事件和参数。它应该会生成一份与附件类似的 select_content 报告。您无需创建观众即可看到此内容。
老实说,这里的答案对我一点帮助都没有。我终于想通了,您必须手动为每个事件添加自定义参数报告。这是文档的 link。
https://support.google.com/firebase/answer/7397304?hl=en&utm_id=ad&authuser=0
而且我想万一这个 link 死了,我将添加下面的步骤。这只是从 link.
复制粘贴
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.
现在要显示您需要配置指标或维度的参数,如下所示:https://support.google.com/analytics/answer/10075209
添加它并等待 24 小时后,您将看到类似这样的内容:
这里shop_exit_app
是主事件,shop_item
是本事件的参数
UPD:
要添加参数,您只需使用如下内容:
logShopExitApp(shopItem?: ShopItem): void {
firebase.analytics.logEvent({
key: 'shop_exit_app',
parameters: shopItem ? [
{
key: 'shop_item',
value: shopItem.title,
}
] : null,
})
}
如果有人像我一样挣扎,我们就是这样做的:
转到左侧面板中的“自定义定义”(其中显示事件、漏斗、受众等)
点击“自定义维度”旁边的“自定义指标”,然后点击“创建自定义指标”。 (出于某种原因,旧参数转到“维度”但是当您创建 event/parameter 组合时,它在“维度”中对我们不起作用...我不知道为什么...)
然后确保您的参数拼写与代码中要求您输入“事件参数”的部分完全相同,其余字段无关紧要。
请注意:更新需要 24 小时,请确保您发送测试事件以激活它。
似乎 Google 改变了一切,让我们所有人都对他们糟糕的文档感到困惑。
今天在 Firebase 控制台中有一个叫做“自定义定义”的东西,它有 2 个未记录的术语; “维度”和“指标”。
在看到这里的所有答案后,他们不知道这些术语是什么意思。您可以拥有一个自定义用户 属性 或从您的客户端记录一个自定义事件。
为了使这些有用,您需要确保分析为其生成报告(最多需要 24-48 小时)。
用户 属性 只有字符串值,而自定义事件具有 string/numbers 的键值对。
起初,我认为维度适用于用户道具,而指标适用于事件参数 - 这是错误的!这里的指标意味着 只有 个数字!因此指标适用于具有数字参数的自定义事件(您可以猜到这一点,因为测量单位中没有“文本”选项),例如游戏得分。
虽然维度似乎适用于用户道具和事件。因此,当您的事件中有一个非数字参数时,您应该将其定义为一个维度,否则,报告将无法为您工作,因为在指标中他们期望数字。所以像搜索词这样的东西应该被视为一个维度。
Google 在他们的文档示例中暗示了这一点 here:
You can create an Author dimension that gets its values from the author parameter and an Article_Length metric that gets its value from the number_of_pages parameter.
引用此自定义事件时:
gtag('event','read_article', {
"author":"Bill Q",
"title":"How to Build a Backpack",
"number_of_pages":2,
});
备注:
- 您不能将相同的参数设置为指标和维度
- 我将更新将数字参数设置为维度时发生的情况
我刚刚开始使用 Firebase 进行应用分析,但在尝试查看与我的事件关联的参数时遇到了一些问题。登录到控制台后,select 访问我的应用程序,然后我 select iOS
版本,我会看到仪表板。所有这些看起来都不错。然后我 select Events
选项卡,我看到我的应用程序记录的所有事件的列表。同样,这一切都很好。但是,我希望能够根据随这些事件传递的参数向下钻取并查看报告。在我的 iOS 代码中,我有以下内容:
[FIRAnalytics logEventWithName:kFIREventSelectContent parameters:@{
kFIRParameterItemID:@"some_item_id",
kFIRParameterContentType:@"some_content_type"
}];
我想知道有多少 "select_content" 事件来自特定的 "content_type"。但我不知道该怎么做。
我尝试使用几天前测试过的 "content_type" 创建一个 Audience
,但我的用户数始终为 0
。所以我不知所措......你怎么看基于提供的参数的事件分析?
您似乎正在记录正确的事件和参数。它应该会生成一份与附件类似的 select_content 报告。您无需创建观众即可看到此内容。
老实说,这里的答案对我一点帮助都没有。我终于想通了,您必须手动为每个事件添加自定义参数报告。这是文档的 link。
https://support.google.com/firebase/answer/7397304?hl=en&utm_id=ad&authuser=0
而且我想万一这个 link 死了,我将添加下面的步骤。这只是从 link.
复制粘贴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.
现在要显示您需要配置指标或维度的参数,如下所示:https://support.google.com/analytics/answer/10075209
添加它并等待 24 小时后,您将看到类似这样的内容:
shop_exit_app
是主事件,shop_item
是本事件的参数
UPD: 要添加参数,您只需使用如下内容:
logShopExitApp(shopItem?: ShopItem): void {
firebase.analytics.logEvent({
key: 'shop_exit_app',
parameters: shopItem ? [
{
key: 'shop_item',
value: shopItem.title,
}
] : null,
})
}
如果有人像我一样挣扎,我们就是这样做的:
转到左侧面板中的“自定义定义”(其中显示事件、漏斗、受众等)
点击“自定义维度”旁边的“自定义指标”,然后点击“创建自定义指标”。 (出于某种原因,旧参数转到“维度”但是当您创建 event/parameter 组合时,它在“维度”中对我们不起作用...我不知道为什么...)
然后确保您的参数拼写与代码中要求您输入“事件参数”的部分完全相同,其余字段无关紧要。
请注意:更新需要 24 小时,请确保您发送测试事件以激活它。
似乎 Google 改变了一切,让我们所有人都对他们糟糕的文档感到困惑。
今天在 Firebase 控制台中有一个叫做“自定义定义”的东西,它有 2 个未记录的术语; “维度”和“指标”。
在看到这里的所有答案后,他们不知道这些术语是什么意思。您可以拥有一个自定义用户 属性 或从您的客户端记录一个自定义事件。 为了使这些有用,您需要确保分析为其生成报告(最多需要 24-48 小时)。
用户 属性 只有字符串值,而自定义事件具有 string/numbers 的键值对。 起初,我认为维度适用于用户道具,而指标适用于事件参数 - 这是错误的!这里的指标意味着 只有 个数字!因此指标适用于具有数字参数的自定义事件(您可以猜到这一点,因为测量单位中没有“文本”选项),例如游戏得分。
虽然维度似乎适用于用户道具和事件。因此,当您的事件中有一个非数字参数时,您应该将其定义为一个维度,否则,报告将无法为您工作,因为在指标中他们期望数字。所以像搜索词这样的东西应该被视为一个维度。
Google 在他们的文档示例中暗示了这一点 here:
You can create an Author dimension that gets its values from the author parameter and an Article_Length metric that gets its value from the number_of_pages parameter.
引用此自定义事件时:
gtag('event','read_article', {
"author":"Bill Q",
"title":"How to Build a Backpack",
"number_of_pages":2,
});
备注:
- 您不能将相同的参数设置为指标和维度
- 我将更新将数字参数设置为维度时发生的情况