How to Setup Firebase Analytics in Flutter (2024)

Поделиться
HTML-код
  • Опубликовано: 11 фев 2024
  • Analytics are an important part of most applications and setting them up doesn't have to be complicated! In this short video, I'll show you everything you need to get set up with Analytics on Firebase for Flutter!
  • НаукаНаука

Комментарии • 22

  • @zeytelaloi
    @zeytelaloi 4 месяца назад +1

    Thumbs up! Just what I was looking for

    • @BradCypert
      @BradCypert  4 месяца назад +1

      I’m glad it was helpful!

  • @lukas7338
    @lukas7338 4 месяца назад +1

    Great video, one question. At 7:40 for the async methods why didnt you change the return type from void to whatever the firebase instance returns?

    • @BradCypert
      @BradCypert  4 месяца назад

      You totally can. I left them as void to indicate that you shouldn’t worry about the return value here. Just fire and forget. But you can definitely update the types to match the return types from firebase

  • @B04S
    @B04S 4 месяца назад +1

    Heya, thanks so much for this! So you do not need the gtag script in the index.html file in flutter web, or do you still need this?

    • @BradCypert
      @BradCypert  4 месяца назад +1

      That’s a very good question. I’d imagine you’d need to add the gtag script, but I just checked the documentation and it’s not mentioned there. Perhaps try it without and if it’s erroring, look at add it?
      Sorry, Flutter is not my web tool of choice haha

  • @someshsahu4638
    @someshsahu4638 Месяц назад +2

    nice explanation thank you so much 👌🏼

  • @abin6909
    @abin6909 5 месяцев назад +1

    How do we debug this? The events are not being logged for me. Except for real time analytics.

    • @BradCypert
      @BradCypert  4 месяца назад

      So the analytics part is fundamentally working? But specific events aren’t showing? Can you share some code of you trying to log an event? The event name has to match a certain format that is not super clear in the firebase docs.

    • @abin6909
      @abin6909 4 месяца назад +1

      @@BradCypert It seems like it takes some time to be added to the dashboard. When I checked the next day, it was there. Still, thanks for replying.

    • @BradCypert
      @BradCypert  4 месяца назад +1

      @@abin6909 yeah absolutely. They aggregate and try to anonymize data and a big chunk of that comes with a time delay. I’m glad it’s working for you now though!

    • @Vsmusic14
      @Vsmusic14 4 месяца назад

      ​@@BradCyperthey I tried to integrate flutter app to ga but when I run code in web analytics is working but I run same code in Android code is not worked and an error is occurred like "Google_app_id " missing how can I solve this error

  • @user-in2zz1vs4p
    @user-in2zz1vs4p 5 месяцев назад +1

    Can you please tell us your flutter version. I have an error in android build with analytics: Missing google_app_id. Firebase Analytics disabled

    • @BradCypert
      @BradCypert  5 месяцев назад

      I think you can get this error if your gradle version is not high enough. Upgrading your gradle and/or try applying the 'com.google.gms.google-services' plugin.

    • @jadamer421
      @jadamer421 4 месяца назад +1

      I am getting the same error, i tried to set higher gradle version and already added the google services plugin but its not working 😢

    • @BradCypert
      @BradCypert  4 месяца назад

      Can either of you share a full stacktrace via Gist?

    • @jadamer421
      @jadamer421 4 месяца назад +1

      @BradCypert sure will share that, and thank you for your support in advance 😊

    • @BradCypert
      @BradCypert  4 месяца назад

      @@jadamer421 absolutely. If I can help at all, I will :)