5

I want to log user search event to Firebase but the Search_Term param value in the Search event doesn't show up in the dashboard. Here my code:

Bundle bundle = new Bundle();
                bundle.putString(FirebaseAnalytics.Param.SEARCH_TERM, searchText);
                mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SEARCH, bundle);

I have tried to log different event with other param and the param value show up in dashboard correctly!

How can I fix this? Thank you

LKH
  • 287
  • 2
  • 3
  • 11

1 Answers1

3

Currently the search data doesn't appear in the Firebase Analytics dashboard.

Your logging seems indeed correct. To see the data you can use Google BigQuery.

One thing you should do is to ensure that searchText is 36 characters or less, otherwise data will just appear as empty in Firebase (and BigQuery).

In general when struggling with data not appearing one should ensure that the logged events follows the possible combinations of events/parameters as described in https://support.google.com/firebase/answer/6317498 . Also notice that the Firebase Console doesn't show the data instantly after being logged (give it at least 30 minutes).

Update:

Firebase Analytics have later increased the maximum length of event names and parameter name to 40 characters, and the maximum length of string parameter values to 100 characters: https://firebase.google.com/support/release-notes/android#wzxhzdk4version_100_-_november_21_2016wzxhzdk5

Community
  • 1
  • 1
Roy Solberg
  • 18,133
  • 12
  • 49
  • 76
  • Where did you find the documentation about 36 characters or less or it will be empty? That seems like a very important detail that I have never seen in the Firebase documentation. – Michael Peterson Jan 13 '17 at 14:01
  • @P1X3L5: It's easy to miss. I couldn't find it in the docs for Android now, but in the API reference: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Param . (The limit has been increased now.) – Roy Solberg Jan 13 '17 at 18:29