Firebase Analytics events from iOS not showing up

后端 未结 10 1876
半阙折子戏
半阙折子戏 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条回答
  • 2020-12-15 04:14

    Another thing to check is making sure your logging entries in the Arguments Passed on Launch are correct. They should start with a - e.g

    -FIRAnalyticsDebugEnabled
    

    and not

    FIRAnalyticsDebugEnabled
    

    I wasted an hour the other day wondering why nothing gets logged.

    0 讨论(0)
  • 2020-12-15 04:14

    Just a simple note here: according to this little video https://www.youtube.com/watch?v=5pYdTgSkW5E after playing with your simulator you must press the home button on the Xcode, otherwise the data will not be sent to the server.

    0 讨论(0)
  • 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

    0 讨论(0)
  • 2020-12-15 04:27

    If you are not receiving events in console, it may be because you are not following naming convention, as I experienced if there is a space in event name it will never show up in the console like following:

    mFirebaseAnalytics.logEvent("Add Camera", bundle);
    

    But when you remove the space like following:

    mFirebaseAnalytics.logEvent("Add_Camera", bundle);
    

    Now you will see events in console, after approximately 3 hours. Application will dispatch the data to console in following cases:

    1- Data is more than an hours old
    2- App goes into the background
    

    You can watch this tutorial for more information: Getting Started with Firebase Analytics on iOS: Events - Firecasts

    0 讨论(0)
提交回复
热议问题