Implementing event logging on Android/iOS
Knowing that analytics start when your application starts sending basic information that you normally see on the dashboard, we can simply create another event. This would be an event that would suit our application's needs. Those analytics logs are free forever, so get creative with your logs or simply play it safe and use the Firebase default events and report them back.
Let's see how we can integrate those lovely, full of data events into our applications for both Android and iOS.
How to do it...
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...