Blog logo on a black background with the words "Discover What's Next in Tech!"

It's #FrontendFriday - Firebase Performance & Analytics

Welcome to today's FrontendFriday! In our Firebase series today, we look at how we can measure mobile apps or websites and then optimize them.

Important functions

Before we dive in, let's list the key features of Firebase Performance & Analytics to see what they offer and how we can use them:

Firebase Performance

  • Automatic recording of the start time of apps, HTTP requests and network requests.
  • It detects areas in the app that can be optimized for better performance.
  • Allows you to select when certain scenarios should be recorded in the app.
  • Monitors important changes in app performance.

Firebase (Google) Analytics

  • Enables unlimited reporting for up to 500 user-defined events.
  • "Audience Segmentation" - You can select the users from whom the data should be analyzed.

How does it work?

Now that we have familiarized ourselves with the key functions, let's take a closer look at what these services offer.

 

 

Firebase (Google) Analytics

Integration is relatively simple. As soon as you integrate and use the Firebase SDK, automatic data acquisition starts.

To send data or events, you must create an event in the software. This can be done as follows:

import { getAnalytics, logEvent } from "firebase/analytics";
const analytics = getAnalytics();
logEvent(analytics, 'notification_received');

Once you have implemented the events, the system collects the data accordingly and displays it in the Firebase console. This data can also be reused in other services, for example:

  • BigQueryHere the data can be easily prepared and exported[3].
  • CrashlyticsThis function enables the collection of errors and the automatic creation of crash reports with information such as date and software version. [5]
  • FCM (Firebase Cloud Messaging): Analytics also collects data via push notifications or general notifications sent via FCM [4]

Firebase Performance

As with Firebase Analytics, performance monitoring begins as soon as the Firebase Performance SDK is integrated. The following processes are evaluated by default:

Of course, you can also define user-defined processes that are to be monitored. As an example, we show here how you can control the starting and stopping of such a process:

// Fügen Sie das Performance Monitoring-Modul zu Ihrem Header hinzu
import FirebasePerformance
// Starten Sie den Trace
let trace = Performance.startTrace(name: "BENUTZERDEFINIERTE_SPUR_BEZEICHNUNG")
// Hier steht der Code, den Sie verfolgen möchten
// Stoppen Sie den Trace
trace.stop()

When should you use Firebase Analytics and Firebase Performance?

  • Use Firebase Analytics from the start to track user interactions and trends as soon as your app or website is published.
  • Firebase Performance should be integrated into your development processes from the outset to monitor application performance during development and ensure that the application runs smoothly from the start.
  • Both tools are extremely useful for small and large projects as they provide continuous insights and optimization opportunities.

Conclusion

Firebase Analytics makes it possible to track user behavior and the performance of an app or website and gain detailed insights into user interactions.
Firebase Performance allows you to monitor the performance of the application to quickly identify bottlenecks and problems.

Overall, Firebase Analytics and Firebase Performance offer valuable tools to increase the success of your digital projects and ensure an outstanding user experience.

Learn more about frontend development

 


[1]: https://firebase.google.com/docs/analytics?hl=de&authuser=0
[2]: https://firebase.google.com/docs/perf-mon?authuser=0&hl=de
[3]: https://www.whizlabs.com/blog/wp-content/uploads/2021/08/What-is-BigQuery.png
[4]: https://1.bp.blogspot.com/-6jV9m0dkLes/YVNpwXg269I/AAAAAAAAF3U/fMw0KE3jMD42Hi15esUnqdrzw14tySEHwCLcBGAsYHQ/s0/FB%2BBLOG%2B2%2BREDO.png
[5]: https://levelup.gitconnected.com/how-to-add-firebase-crashlytics-to-your-ios-app-e1bdef983297

Matijas Milos

About ME

All contributions from Matijas Milos

Learn more

Further information on our website and in our newsletter

Arrow up