Let us first see how event logging is done on Android:
- After you've successfully installed the library in your application and selected the required activity of class where you want to host your analytics within, start with a reference, just like everything in Firebase:
private FirebaseAnalytics fireAnalytics;
- Then in your onCreate method, grab the analytics instance via the following line:
fireAnalytics = FirebaseAnalytics.getInstance(this);
- Now after grabbing our working reference, let's send some logs.
- After choosing the place where you want to send the valuable analytics info, simply add the following line via calling the logEvent() method:
fireAnalytics.logEvent(“cookbook_request”, null);
- This tracks the event ...