firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.73k stars 3.98k forks source link

[📚][firebase_analytics_web]: Firebase Analytics for Flutter Web not working if Google Tag is not included in index.html #16746

Open pcba-dev opened 1 week ago

pcba-dev commented 1 week ago

It appears that Firebase Analytics for Flutter Web requires the Google Tag script to be manually included in the index.html file for proper functionality. Without this, the Google Analytics panel reports that "Data collection isn’t active for your website," even after correctly initialising Firebase Analytics as per the Firebase Analytics documentation.

If it is actually required, the documentation should explicitly instruct developers to include the tag.

SelaseKay commented 1 week ago

Hi @pcba-dev, thanks for raising this. However, I don't think you have to manually add Google Tag script to get analytics working. I just tested with the current firebase_analytics example app and it works fine without the script. Which firebase_analytics version are you using?

pcba-dev commented 3 days ago

We are using firebase_analytics v11.3.5. We have removed the Google Tag script and are waiting in case it takes 48h as it indicates the Analytics pannel.