What’s new in Google Analytics in Firebase?

Tram Ho

Google Analytics (also abbreviated as GA). A keyword that many of you are familiar with. GA is used to measure our app traffic. Simple example such as we will be able to statistics the number of times users log in, logout, … In addition we can statistically some other special business. I used to work on GA but only at that level. And later when I dabble, I see GA can be integrated in Firebase . So today let’s find out what GA has to offer when integrated with Firebase ! Let’s start…!

I. Learn about GA and the integration steps in Firebase .

1. Google Analytics (GA).

Google Analytics is a free application measurement solution that provides insight into application usage and user actions on the application.

Central to Firebase is Google Analytics , a free and unlimited analytics solution.

Analytics integrates on Firebase features and provides us with unlimited reporting for up to 500 separate events (the event here may be a login, logout, or other business related event). own) that we can define, define using the Firebase SDK.

Analytics reports help us understand user behaviors when using our app, which allows us to make informed decisions regarding app marketing and performance optimization.

So, how does GA work? … Let’s find out in the next section …!

2. How does GA work?

Google Analytics helps us understand how users use their web, iOS or Android apps.

When our application is integrated with GA, GA automatically captures a number of user events and attributes and also allows us to define our own custom events to measure corresponding private businesses. with our application.

When data is recorded, it is available in the dashboard (dashboard) through the Firebase control panel. This dashboard provides detailed information about our data – from summary data such as the number of active users and demographics (Demographic is a familiar marketing concept to indicate one of the marketing segments. market, identify potential customers of the business), to more detailed data like identifying the most purchased items of an online sales app.

Analytics also integrates with some other Firebase features. For example, it automatically logs events corresponding to notification messages sent through the message editor and provides reports on the impact of each campaign (in marketing).

Analytics helps us understand what user behavior is like, so we can make informed decisions about how to market our applications. View the performance of your campaigns on organic channels (source of naturally reaching customers in marketing) and pay to understand which method is most effective in reaching high-value users. If you need to perform custom analysis or join your data to other sources, you can link your Analytics data to BigQuery, allowing for more complex analysis like querying large data sets and joining. Many data sources.

We know GA works like that, so let’s take steps to integrate GA into our app!

3. Steps to integrate GA into web applications (ReactJS).

First, create a Firebase project. Then create 1 webapp application. Next, turn on Google Analytics (we can go to the Project settings tab Integrations ). Once enabled, Project Firebase will be linked to the data side of Google Analytics .

At the web application, we begin to install the Firebase package as Firebase :

Next create an init-firebase.js file used to save Firebase configurations and initialize as Firebase :

Note this measurementId: "G-9VP01NDSXJ" is required to make sure that Google Analytics is enabled in the Firebase project and monitored in the application. If not, then maybe we are wrong one step, try to review and get back the configuration file properly.

Then to be able to log the events posted, we will create an analytics reference and call the logEvent function as logEvent :

Note that we will have 3 main types of events in turn:

  • Events are automatically retrieved (when integrated into the application, then when the user uses the application, these events will be automatically retrieved, if we do not want to get, you can add analytics configuration to remove) as page_view ( screen_view for IOS or android), session_start , first_visit ( fist_open for IOS or android), … can see more here .
  • Recommended events (those recommended by GA, probably those that have been aggregated by GA based on applications that have been used by GA and are considered popular by GA) and divided into Certain sectors such as retail, e-commerce, tourism, employment, education, etc. can be found here , here , here and here .
  • The event is defined by us to match the application’s business. Simple example such as having an e-commerce application, we want to statistic the number of orders placed, the number of orders created, the number of orders placed successfully, etc., there will be corresponding events as request_order , create_order , create_order_successfullly .

Above we have integrated it so now see the results on the dashboard (Analytics) of Analytics on Firebase (Note that our events will be displayed after 1 day from the event of the log up. Please ? but do not log realtime right away: v. If the dev we want to see at the time of the event log to test, we can use debug view ).

Next let’s take a look at some pretty cool features of Google Analytics on Firebase .

II. A quick look at some of the features of GA.

Let’s take a look at some of the major features that I feel are quite satisfactory:

  • Dashboard: The first part is the Dashboard, which is a dashboard that gives us an overview of our application such as the number of people operating in the last 30 minutes (compared to the current time), the number of people working with which screens (% of screens correspond, average time), countries in the world, and the corresponding number of users.

  • Events: Next is the event that will contain all the events logged but will be 24 after being logged, and in case of dev, we can use debug view to see realtime.

  • Audiences: Will help us break down each user segment and see information that is only in that user segment. For example, the user partition only uses websites, or smartphones, etc. The example in the image above will be the segment of users who have paid for goods, for example.

  • Funnels: A pretty interesting and useful feature. Funnels gives us a clear, specific view of a process that serves a certain business. As shown in the picture above, we have a process that starts from the time the user enters the app until the user pays money to buy a product. From there we will know the clear number to propose the next marketing plan. For example, there are 10 people on the app and 5 people who buy the product for example.

Above are some features that I find interesting and how about you! Or start to try and experience it now!

III. Conclude.

Google Analytics very different before and after being combined with Firebase right! Adding more interesting features, helping us have the most accurate user identification when using our application, so that we can come up with reasonable strategies to promote products, increase sales, and more. ..

Then my share here is over! Hope it will bring you useful knowledge about Google Analytics . In the next article, I will do a demo to dive into discovering more about GA! And now, goodbye and see you again in the next lesson! Hello!

Share the news now

Source : Viblo