8

Firebase custom event, with parameters item_id and item_name not showing correctly in console.

I can see the firebase custom even, have tried the 'edit parameter reporting' button on the events firebase console, and setup reporting for item_id and item_name, but the string values I bundle with these keys does not show.

Am I missing any required parameters for custom events? I could not find any documentation requiring any.

val firebase = FirebaseAnalytics.getInstance(this)
        val bundle = Bundle()
        bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "email_feedback")
        bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "yes")
        firebase.logEvent("app_review_request", bundle)

I expect to see something in the console. However I see this

Edit parameter reporting Custom events coming through item_id and item_name params empty

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
yorkie1990
  • 181
  • 1
  • 8

2 Answers2

3

it's better to put extra info for the log in the bundle and use the firebase general event type for logEvent. when you use a custom event name for logEvent firebase will limit the length of the data's character you send. for example, if you want to send user clicks events to firebase its better to use this approach

Bundle bundle = new Bundle();

bundle.putString(FirebaseAnalytics.Param.ITEM_ID, yourValue);

bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE , "CLICKS");

FirebaseAnalytics.getInstance(this).logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);

the FireBase event is set to select_content. and also we defined a content type with the name "CLICKS". so whenever you open the firebase console if you filter SELECT_CONTENT tag you will see "CLICKS" content that holds all log that you send. the values are showing as ITEM_ID value in console. if you want to test you can use debug view with a device to test what your client sends to fireBase each time . hope this will helps you att all.

0

With the example of Firebase.logEvent() you are registering a suggested SELECT_CONTENT Event, the value of the item_id is always email_feedback thats because you never see the changes on the console.

I suggest create a custom bundle events

Bundle bundle = new Bundle();
String clicked = "yes" // yes-no or 1-0 depending on your app behavior
bundle.putString("email_feedback", clicked);
mFirebaseAnalytics.logEvent("app_review_request", bundle);

I also recommend check this answer that shows you an example of how Firebase Events are organized in the Dashboard Console