Firebase – Analytics
Hello droiders, welcome to the sixth part of this tutorial series on Firebase. A quick glimpse of previous parts:
- Part 1, Firebase – Cloud Messaging, formerly known as Google Cloud Messaging, is a new and improved way of delivering Push Notifications to major platforms that include Android, iOS, and Web.
- Part 2, Firebase – Crash Reporting, a comprehensive tool to receive detailed information about the Crash.
- Part 3, Firebase – Storage, a storage for app developers like us, comes with storage backed with Google Cloud Storage.
- Part 4, Firebase – Basic Authentication, a type of authentication which authenticates a user with his email and password.
- Part 5, Firebase – Social Authentication, a type of authentication which authenticates a user with their identity using either Google, Facebook or Twitter.
In this part
In this article, We are going to discuss how firebase analytics integrate into our application. Firebase Analytics allows us to track users activity in our application it will help us to track which features and functionality user most like. Firebase Analytics collect some events automatically for that we need to link account like AdMob, AdWords, Google Play Store account for the in-app purchases etc.
Firebase logs primary two types of information.
- Events: user action, system events, screen flow, errors etc.
- User Properties: language preference, geographical locations, user gender, user age etc.
In this post, We are going to create a demo that will perform following operations:
- Firebase Analytics Events
- Firebase Analytics User Properties
- Android Studio 1.5 or above
- Google Play Services 9.0.2 or above
Add Firebase to your app
- Go to Firebase console and click on Add Project to create a new project. Fill the Project Name and select country then click on CREATE PROJECT.
- Click on Add Firebase to your Android app.
- Enter package name, App nickname (optional) and Debug Signing certificate SHA-1 (optional) and then click on REGISTER APP.
- Download google-services.json file.
The Google services plugin for Gradle loads the google-services.json file you just downloaded. Modify your build.gradle files to use the plugin.