Firebase Analytics events from iOS not showing up

后端 未结 10 1927
半阙折子戏
半阙折子戏 2020-12-15 03:39

I am testing the new Google-powered Firebase, and have implemented remote notifications and crash reporting. I am, however, having massive problems with getting Analytics to

10条回答
  •  萌比男神i
    2020-12-15 04:16

    React-Native App (IOS/Android)

    I had the same problem, debugView wasn't working, and streamView glitches a few times, the best way ive found to test my events was to logEvents with my createPageEvent() and then

    the important thing is to put the app into background after logging the events, they will show up almost in realtime on firebase events or in streamView (check this article to see when events are sent to firebase)

    events are only sent after 1 hour since they have been logged or immediately if you put your app in background.

    import firebase, { RNFirebase } from 'react-native-firebase';
    
    export default class AnalyticsService  {
    
        static async initialize() {
            firebase.analytics().setAnalyticsCollectionEnabled(true);
        }
    
        static async createPageEvent(screen: string) {
            firebase.analytics().setCurrentScreen(screen)
            firebase.analytics().logEvent(`open_${screen}`)
        }
    
    }
    

    the result is this in streamView almost realtime ->

    Now you can start building funnels and stuff

提交回复
热议问题