如何将自定义参数与保留事件一起发送到 firebase 分析
How to send custom parameter along with reserve event to firebase analytics
我可以使用以下方法将自定义参数与自定义事件一起发送到 android 中的 firebase 分析 :-
Bundle bundle = new Bundle();
bundle.putString("Action", "Action Perform Android");
bundle.putString("Category", "CustomEvent Android");
bundle.putString("Label", "click me");
firebaseAnalytics.logEvent("Button_clicked", bundle);
以上方法有效,我们可以在 firebase 控制台上看到此事件。
Here 是事件名称保留的一些事件,我们不能再次使用此名称将事件发送到 Firebase 分析,如 notification_dismiss
、notification_open
等。这些预定义事件是由 Firebase 自动收集。
现在我想随上述事件一起发送一些自定义参数。
例如,当 notification_open
事件被触发时,我想将通知标题作为自定义参数与此事件一起添加。我们如何覆盖 notification_open
事件或如何在 android
中设置通知标题自定义参数以及此事件?
无法为自动发送的事件添加自定义参数。您必须定义自己的事件才能将这些参数添加到。
完成后,您可以在 BigQuery 中组合标准事件和自定义事件,以在单个报告中同时获取默认参数和自定义参数。
我可以使用以下方法将自定义参数与自定义事件一起发送到 android 中的 firebase 分析 :-
Bundle bundle = new Bundle();
bundle.putString("Action", "Action Perform Android");
bundle.putString("Category", "CustomEvent Android");
bundle.putString("Label", "click me");
firebaseAnalytics.logEvent("Button_clicked", bundle);
以上方法有效,我们可以在 firebase 控制台上看到此事件。
Here 是事件名称保留的一些事件,我们不能再次使用此名称将事件发送到 Firebase 分析,如 notification_dismiss
、notification_open
等。这些预定义事件是由 Firebase 自动收集。
现在我想随上述事件一起发送一些自定义参数。
例如,当 notification_open
事件被触发时,我想将通知标题作为自定义参数与此事件一起添加。我们如何覆盖 notification_open
事件或如何在 android
中设置通知标题自定义参数以及此事件?
无法为自动发送的事件添加自定义参数。您必须定义自己的事件才能将这些参数添加到。
完成后,您可以在 BigQuery 中组合标准事件和自定义事件,以在单个报告中同时获取默认参数和自定义参数。