40

I have integrated firebase into my Android application. I am sending custom events as follows :

 Bundle bundle = new Bundle();
        bundle.putString("First Category", "First catValue");
        bundle.putString("sub Cat", "sub CatValue");
        bundle.putLong(FirebaseAnalytics.Param.VALUE, "value");
        firebaseAnalytics.logEvent("My Custom Event", bundle);

None of my custom events show on events tab on firebase analytics dashboard.

I have taken look in some questions already asked like this one : Android Firebase Analytics Custom Events Reporting in Console

But couldn't solve my problem as I tried some of the suggestions there, like it was suggested to test with more than 10 users to be able to get the custom events which I did but nothing is shown in the events tab.

I debugged using following commands:

adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC

My events are getting logged on command prompt but not getting reflected on firebase dashboard.

Am I sending custom events wrongly ? Do I need to configure anything on firebase dashboard to get the custom events ?

Update :

When I debugged using commands :

 adb shell setprop log.tag.FA VERBOSE
    adb shell setprop log.tag.FA-SVC VERBOSE
    adb logcat -v time -s FA FA-SVC

I found this important log stating Name must consist of letters, digits or _ (underscores).

Then I changed my event as below :

 Bundle bundle = new Bundle();
            bundle.putString("First_Category", "First_catValue");
            bundle.putString("sub_Cat", "sub_CatValue");
            bundle.putLong(FirebaseAnalytics.Param.VALUE, "value");
            firebaseAnalytics.logEvent("My_Custom_Event", bundle);

Then I enabled debug view https://support.google.com/firebase/answer/7201382?hl=en&utm_id=ad as suggested by adbitx in answer below, then events started showing.

Community
  • 1
  • 1
Prashant
  • 4,474
  • 8
  • 34
  • 82
  • 2
    Thanks. You saved my time. Do Custom events come in events dashboard? – akshay bhange Mar 22 '18 at 10:39
  • 2
    Welcome, Yes they do come to the events dashboard – Prashant Mar 22 '18 at 10:57
  • @pcj Hey can you tell me do we have to link the firebase analytics with Big Query in order to get my custom events logged in Dashboard. The above solution is not working in my case, the events get logged in terminal but they don't appears in Debug View in Dashboard of firebase console. Please do let me know I'm missing. – Kotdroid Feb 08 '19 at 10:10

2 Answers2

39

Update :

When I debugged using commands :

    adb shell setprop log.tag.FA VERBOSE
    adb shell setprop log.tag.FA-SVC VERBOSE
    adb logcat -v time -s FA FA-SVC

I found this important log stating

Name must consist of letters, digits or _ (underscores).

Then I changed my event as below :

 Bundle bundle = new Bundle();
            bundle.putString("First_Category", "First_catValue");
            bundle.putString("sub_Cat", "sub_CatValue");
            bundle.putLong(FirebaseAnalytics.Param.VALUE, "value");
            firebaseAnalytics.logEvent("My_Custom_Event", bundle);

Then I enabled debug view https://support.google.com/firebase/answer/7201382?hl=en&utm_id=ad as suggested by adbitx in answer, then events started showing.

Prashant
  • 4,474
  • 8
  • 34
  • 82
22

It usually takes a few hours for the data to show up on your dashboard. If you would like to check whether your events are logged and received correctly by Firebase Analytics, try DebugView and you should be able to verify the traffic. The 10 users threshold is for Audience, not custom events.

adbitx
  • 2,019
  • 8
  • 13