April 8, 2020
Firebase Analytics Tutorial – How to track Mobile Apps

Firebase Analytics Tutorial – How to track Mobile Apps

– In this video, I’m gonna give you a quick overview Google’s new analytics tool Firebase Analytics, which is made with mobile apps in mind. We will take a look at
a sample implementation and I’ll walk you through
the new interface. All the more coming up right after this. Hi there and welcome to another
video of Measureschool.com where we teach you the data
driven way of digital marketing. My name is Julian and on this channel we do tutorials, how-to videos, and take a look at the
newest marketing tech just like this video. So if you haven’t yet,
consider subscribing. Now a little while back,
Google introduced Firebase as its new tool set for
mobile app developers to build, grow, and
monetize their mobile apps. A bit hidden was the announcement
of Firebase Analytics which integrates very well into
these new tools and services that Firebase provides. And it really caters to this
new mobile centric world. The only confusing part
of this whole introduction was that Google already has
a standing analytic suite with Google Analytics,
which also works with mobile apps. Adding to all of this, Google Tag manager got a new form of implementation which piggy backs actually on the Firebase SDK. But let’s take a closer look and how we can integrate Firebase and use it to measure our mobile apps. All right today our journey
stars at Firebase.Google.com the official home of the Firebase suite and we will take a look
what Firebase exactly is. There is a great overview here because Firebase is actually
a suite of different tools that will help mobile app developers to develop, grow, and earn more money with their mobile apps. All these different tools are available to the developer to use
in their mobile apps. At the heart of Firebase is the analytics suite. As you can imagine, all
these different tools can be used and also tracked with the analytics component of Firebase. They integrate very well. So if you for example use
the authentication feature or the test lab feature of Firebase, you will be able to later measure the data in Firebase Analytics as well. So let’s get started
on installing Firebase on a test app. Let’s go over here to get started. We will go over to our console which is the Firebase console. Here you see all your projects and for a new project
we’ll simply create one. Give this a name. And then choose our preferred
method of installing it. You can install Firebase on iOS devices, Android devices and also web apps although the analytics
suite is not available on the normal web app calls. I don’t know if it is gonna
be available at some point but anyways we have Google Analytics available for measuring
web apps correctly. Now in our case, I have built
a little Android app here so let’s install this
on an Android device. We need to have our package name, which we usually can find
throughout our application when you’ve installed it. Give it a nickname. And optionally you can
add your charone key. This is only necessary
if you want to use the authentication features of Firebase. Now this will generate
a JSON file for you. This is the Google services file which needs to be installed
in your app folder of your app. I have already done this. And as you can see, it is then available in my Android studio and this is configuration file for Firebase Analytics which
we need to include into our app as well. Now there are certain
steps we need to follow. First of all, we will
need to add dependency to our build gradle
within our Android Studio, so I’ve already done this but just to show you here
is the build gradle file. If I’ve added the Google services here and this also needs to be
done within the app folder on the build gradle, where you need to add the
plugin to reference the Google services. Additionally to this, you will need to add the
dependency of Firebase. So any dependency here, I’ve added the dependency
of the Firebase core file. Once this is added, you need
to sync your gradle files. Then Firebase ready to use in your app. Now how can we start measuring
data with Firebase Analytics. There are a few more steps to go through which all are described pretty
well in the documentation of Firebase. After we have installed the Firebase SDK, we need to add the Firebase core files which we have already done but then we need to
initiate Firebase Analytics. We need to give it a private variable and then initialize it within instant of this Firebase Analytics in our main activity. Let’s go over to our Android Studio and kick into the main
activity of our app. And I’ve already given
5ACA private variable that we need to initiate, which I’ve done on this line as well. Now if I start my app,
and I don’t get any errors this will already be sending data over to our Firebase Analytics suite. Now it is a little bit hard to see what’s going on under the hood but you can enable web host login for your Android console so you know when events get
sent over or errors occur. For that you need to execute some commands described in
the documentation as well. And then you can see in
your Android monitor here what data has been locked. So for example here, Firebase
is initialized successfully and starting to measure data and automatically we already
collecting when the app is first opened. If there are different users you would have account of all the users who are using your app and activity connected to that such as first open or how many
times it has been open in a timeframe. This is all send over to
Firebase Analytics automatically and we should be already able to see the data in Firebase Analytics. Unfortunately it takes
quite a while to populate the data in our console. This is due to the nature
of how mobile apps work and how data gets sent over to Firebase so you need to stay patient. It can take a few hours to be populated. Fortunately I have already
built a demo account here, where we can see how many
active users are using this app and their activity. Now what if you wanted
to log any other data, custom data that is important for your app that goes beyond the
open event for example. There are certain calls that you can use to log events within Firebase Analytics. They are all described again
in the documentation here. What you need to do is
open up a new bundle, fill this bundle with your parameters and then send over a log event call to Firebase Analytics. Now Firebase already has
some predefined events that you can use. These predefined events
are special for eCommerce and different kind of apps. But you can also use your custom setup and send in events by yourself. To demonstrate that I have built in here a click listener for our buttons on our main activity. And again I’m opening up here a new bundle and then sending in the
parameters for the button ID. I have different cases here. Which button gets clicked
is transferred into that button ID field and then in the end I’m
sending over a log event to Firebase Analytics which holds the button name. You can see again what is happening in our monitor here
when we click a button. We see an event gets send
over to Firebase Analytics. That should again transfer into the app. This takes a while. In our demo app here, I
have some events logged. You can see the count and from here you can also define it as a conversion which will later help you analyze the data within
Firebase Analytics. Now what would these reports
look like if they are filled? Well Google actually gives
us a Firebase demo project that you can also get access to which holds data for a real
life app called Flooded. Let’s go into the analytics here. And have a look at the data. We see it is quite different
from Google Analytics but we can still choose
our data entered here and get some useful
reports about the activity of the user. The revenue if you send
in any revenue data. Automatic data that is collected also by pulling in data from
the Google Play services such as where did your user come from when he installed your app. Retention cohorts. How your user is engaged with your app and if you sent in custom data, such as revenue and purchase information you will also be able to
get this report filled. Of course some data about the technology that is running, which
app version is running, the devices and data such as the location and demographics of the user. Now additionally you can set up filters. You can define audiences. If you send in events, you have certain attribution that you can also filter
down on in terms of networks that would be if you want to install for example conversion
tracking for AdWords, you can build funnels and look at a visualization. Define cohorts and if your users have
different properties that you have send in you can also manage them from here. There you have a quick overview on how to install Firebase Analytics and how it can be used
to measure your apps. There you have it. This is how you can install Firebase on your mobile app. At this stage, I would recommend
to use Firebase Analytics for new mobile apps if
you want to track them. Although it doesn’t have
quite all the features that we are used to
from a Google Analytics. That said, it is apparent that Google heavily invests into Firebase and wants it to be a success. I’m not really quite sure about the standing of Google
Analytics for mobile apps at this point in time. Are you interested in
learning more about Firebase? Then check out this great Firebase channel by the folks at Google
that is mainly catered to developers but still has
some very good information about how Firebase works
and how you can track things with Firebase Analytics. If you like this video, please give us a thumbsup, and if you haven’t yet,
consider subscribing because we will bring you
new videos every Wednesday. My name is Julian. Until next time.

48 thoughts on “Firebase Analytics Tutorial – How to track Mobile Apps

  1. Great video Julian. Request: how about a video showing how to use Firebase GTM for mobile apps to convert Firebase to Legacy Mobile App Tracking

  2. Fantastic overview over Firebase, Julian. It's not the most common topic today but a rising one for sure. Thanks a lot fur that video.

  3. Hi Julian…Your advise needed.. IS there any google certification program for GTM and do you have a comprehensive certification programe…also is there any dummy site where i can implement the GTM tags.

  4. Thanks a lot for the amazing content as always ! What analytic tool would you recommend for Mobile Apps that scales better? Firebase or Mixpanel (Or another) ?

  5. Thanks for the Video it is really helpful! Can you do any with integration from Firebase to Google Tag Manager? It not so well documented by Google DEV.

  6. Great video. But to use Firebase + Google Tag Manager, do we still have to install using the process you described here and then simply use GTM to manage event tags? It seems like there would be no way to actually use GTM to add Firebase to your app as you can with Google Analytics. Is this correct? Sorry for the newbie question, as a non-developer it is tricky to get my mind around all this. Also, would love a video on how to install Firebase + GTM on hybrid apps (Ionic/Cordova/Phonegap) as it seems even more complicated!

  7. Hi. It seems that you used custom event name like Button1Click etc. I' tried to create custom event but it doesn't appear to my Firebase Console Events list. Do I need to link it to BigQuery just to make it visible to my Event list?

  8. How do I remove an event in Firebase Analytics console? Also, I"m not sure where to view the ITEM_NAME under my events.

  9. Hi, awesome Tut! I just want to know if you could run over the GTM implementation of this. I am surprised that you directly implemented it in the code and not through GTM ?

  10. Hello please heeeeeeeeeelp ca I control value of remote config by external rest clint like postman
    Pleaaaaaaaase help
    I really neeeeeeed Answer as soon as possible
    Thanks allot for any help

  11. Thank you for your help with Google optimise. I have a app built with Cordova, do you have a guide for this?

  12. I'm a fresh subscriber to your videos, great work! I haven't yet tested Firebase, still using the legacy google analytics mobile app tracking. My question is about it: Is setting up event tracking with GTM for mobile apps the same process as is for desktop websites? Can I use variables from datalayer and create events with them?

  13. i saw my friend is making android app analytics in their admin page in website, i wonder why he did not use firebase, its already there, and complete, and also he has a page that show comments in playstore APK, how he do that? is it integrate firebase with admin page?

  14. Hi Julian! I had a issue about the importing the events/conversions to adwords from firebase. I linked accounts from firebase, i ve checked from adwords to see if it s linked, so it is! Then in adwords account, when I want to import the conversions from firebase….it s empty, nothing… Notice!! In firebase i have all the events/conversions, also I can see from Analytics. Why? Can you help me? Thanks!

  15. We want to know how to set up "custom events", ie events that a user performs and then gets tracked
    We want to know how to make a marketing campaign in the form of banners (multiple) and then be able to track them (conversions) and also analyze which campaign performs better.
    We also have a web view where we accept payments, we would like to create a new conversion / event that tracks all payments, both in-app and web-view. For this purpose, we will provide you with JavaScript code examples and an explanation of how the path from event / conversion setup to code installation is. (since we can not see a Tioken or key at an event when we create it there)

  16. Hi, do You have any content about How to track Mobile Apps using GTM? I am founding for a long time but doesn´t exist content in video. Thanks.

  17. I'm trying to do this in Unity, my set up is good because FirebaseAnalytics.LogEvent("Begin_New_Game"); works fine!
    However, in unity C#, I cant create a bundle? the ide doesnt recognise "Bundle" as anything. Am I missing a "using"?
    I feel like im so close! thanks for any help from anyone know knows what i've missed out. thanks

  18. Wow, this is way too cool than i expected! I was hoping if there is more video about it? I hope you can make more video of such topic! Looking-forward 🙂

    Anyway, i was hoping if i could get some feedback on this open source android app I have posted below? I am a beginner and hope to learn on how to improve it…

    bit. ly/2SJ8b7g

    Sorry about the shortened link having spaces in between… Will appreciate if you could remove the spaces to access this google play store app.

    thanks a-hundred !!

  19. I need in one app, one button, when i press this button, it enable another button in another app. Example both app are open in 2 diferent cellphone. Then when i press the button in the fisrt app, in the other app appear one button, then when i press that button. the button from my app disapear.

    How can i do that, is possible?

  20. Hi, I added to json code in app, but I can not see source of our event(only direct). I saw direct and not set source in events. How can ı see google/organic and google/cpc in source of event? Thanks a lot!

  21. Excellent tutorial. One doubt – What if we migrate from google anlytics? How the historical data can be meregd in firebase analytics????

  22. Hi Julian,

    Is it possible to check how many conversions we got from different sources? I think this is vital information in developing apps. We can check everything in GA for web page, but how to do it if we have a mobile app? There is nothing like that in firebase so maybe we shoud integrate Google Analytics with firebase if it is possible?

  23. Please help! My custom log event not showing in firebase console, whereas it is showing in android studio console

  24. Cool but i have question. What if i have two separate apps that are using same application id (for google play purposes) . One is android mobile, other one is android TV. How can i configure this to only show Firebase events from android TV app, without changing application-ID from build.gradle. I think i can use FirebaseApp and initialize it with some unique string that will be same as string i will input in Firebase console when creating new app (It won't be the same as the one in application-id). But i did not found a way to than connect that FirebaseApp with Firebase Analytics object which have method logEvent. Can you help me, do you have any idea?

Leave a Reply

Your email address will not be published. Required fields are marked *