Search code examples
androidfirebasefirebase-analytics

Android - I can't see any events in firebase console


I am sending Log Events to fireBase like bellow :

FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle bundle = new Bundle();
bundle.putInt("vendor_id", 588);
mFirebaseAnalytics.logEvent("manage_price_products", bundle);

But I can't see any Event in my console!

enter image description here


Solution

  • First, you can use the parameters provided by FirebaseAnalytics.Param class as defined here: FirebaseAnalytics.Param to pass into the bundle. Also note that, you can use the events provided by FirebaseAnalytics.Event class as defined here: FirebaseAnalytics.Event to pass into logEvent.

    For example, your code would look something like,

    FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
    Bundle bundle = new Bundle();
    bundle.putInt(FirebaseAnalytics.Param.ITEM_ID, 588);
    mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.ADD_TO_WISHLIST, bundle);
    

    Regarding Custom Events:

    The official Google Support answer states that:

    Google Analytics for Firebase allows you to specify 25 parameters with each logged event. You can then identify up to 50 total event parameters (40 numeric and 10 textual) for which you would like to see reporting by registering those parameters with their corresponding events. Once your custom parameters have been registered, Google Analytics for Firebase will display a corresponding card showing the data in each event detail report.

    1. In the row for the event you want to add custom parameters to, click More > Edit parameter reporting.

    2. In the Enter parameter name field, enter the name of the parameter you'd like to add.

      If a match is found, select it in the list and click ADD. If no match is found, click ADD, then enter the parameter name.

    3. Set the Type field to Text or Number. For numeric parameters, set the Unit of Measurement field.

    4. Click SAVE then click CONFIRM.

    Then you would be able to see the Event listed.

    Please note that it may take upto 24 hours to get your data listed and updated on the Firebase Console. Also, the Firebase Console follows PST timezone.