[REQUIRED] Describe your environment
- Operating System version: macOS
- Browser version: Firefox 72.0.2 (64-bit)
- Firebase SDK version: 7.8.0
- Firebase Product: analytics
[REQUIRED] Describe the problem
I’ve added a web app in Firebase console to integrate Firebase Analytics:
The problem is Firebase Analytics doesn’t show any data for the web app. Like the website has no visits at all. I tried few ways to integrate Analytics:
<script src="https://www.gstatic.com/firebasejs/7.8.0/firebase-app.js"></script>
<!-- If you enabled Analytics in your project, add the Firebase SDK for Analytics -->
<script src="https://www.gstatic.com/firebasejs/7.8.0/firebase-analytics.js"></script>
<script>
const firebaseConfig = {
...
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.analytics();
</script>
<script src="/__/firebase/7.8.0/firebase-app.js"></script>
<script src="/__/firebase/7.8.0/firebase-analytics.js"></script>
<script src="/__/firebase/init.js"></script>
nothing worked.
Quite similar issue described here: https://stackoverflow.com/questions/58484726/firebase-analytics-not-showing-data-for-web-application with no answer.
By the way, I use custom domain.
I believe the issue is that in this documentation, it isn’t apparent that you have to add this line after loading /__/firebase/init.js,
Once I added that, analytics started working. I didn’t even add the logEvent(‘notification_received’); call, simply adding firebase.analytics(); will work.
@hsubox76 when i initialise analysis with
firebase.analytics()
, I don’t see any POST request in network tabI’m having the exact same issue.
The GA addon doesn’t log anything.
Not sure if it matters but:
firebase.analytics().logEvent('notification_received');
doesn’t solve itIt works in google chrome. Events are being logged. it doesn’t work in any other browser. Not even other chromium based browsers like Brave or Edge are working.
What other info can we provide to help resolve this?