Expected Behavior
This code should log an event “myEvent”:
import RNFirebase from 'react-native-firebase';
const firebaseApp = RNFirebase.initializeApp({ debug: false });
firebaseApp.analytics().logEvent("myEvent");
Actual Behavior
I don’t see “myEvent” anywhere in my Firebase dashboard analytics. Other, default Firebase events, such as “app_open”, “session_start” are all being recorded, and I believe that’s happening from react-native-firebase.
Build:
- RN: 0.45.0
- RN-Firebase: 1.1.0
- Emulator: Nexus 5X API 25
Praise
This library is so much nicer than using the WebSDK, thank you for all your work.
Thanks @dannycochran, very kind of you to say!
Firebase analytics events can sometimes take a little while to come through on the dashboard. You can however turn on debug view which should allow you to debug in realtime by following the instructions here: https://firebase.google.com/docs/analytics/debugview
Let me know if you’re still having problems once you’ve tried debug mode and I can take another look. Events are definitely working in my iOS and Android app at the moment…
Yeah that’s normal. They can take hours annoyingly! Same with Performance Monitoring, takes yonks.
@dannycochran for reference, what I’ve found is that when you first sending events it takes a while to come through then they generally come through a bit quicker after that. Still nowhere near realtime though!!
Maybe this is useful in the future. I use analytics like so (this is typescript)
I’m using current-as-of-now versions of everything (react-native 0.60.5, react-native-firebase v5.5.6, iOS Firebase SDK Pods 6.7.0, Android Firebase SDK BOM 2.20.0
contents of ./src/utilities/Analytics.ts
Usage:
It works for me ?