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.
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.
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.
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 click on Stream View.
I click on Trending then Events
I see a list of realtime bundle log data.
How can i view action count of log history.
How can i nest events.
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
To summarize the steps:
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.
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:
Enable Debugging in IDE
adb shell setprop log.tag.FA VERBOSE
Enable Debugging in Debug View of Firebase Analytics
adb shell setprop debug.firebase.analytics.app <your_app_package_name>
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.
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
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.
I hope this helps you in your issue with events in Firebase Analytics.
EDIT: 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.
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.
Regards,
Aj
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With