Contents of Bundle in Firebase Analytics Event not showing in dashboard

Viewed 827

I have the same issue as this thread but the answer is outdated and seems to be incorrect. It refers to a button "Add event parameters" which is not present in the current version of firebase.

I want to view the content of the bundle for the event on my Firebase event page. Here is my event page on firebase:

enter image description here

I've followed this firebase tutorial and here is my code:

    private fun sendLogging(context: Context, source: String, logMessage: String) {
        val bundle = Bundle()
        bundle.putString("LOG_MESSAGE", "$source $logMessage")
        FirebaseAnalytics.getInstance(context).logEvent("PUSH_CONTENT_NOT_RECEIVED", bundle)
    }

The source and logMessage contain precise information about what went wrong and I need to view this. It should show up?

EDIT:

I went to "Custom Definitions":

enter image description here

And I've added the event:

enter image description here

I discovered that only from that moment it started collecting information. But I do not see the information that I've logged anywhere. Where is it?

2 Answers

Adding LOG_MESSAGE to the Custom Definitions as an event-scoped custom dimension is the correct direction. You can follow the "Create a custom dimension" on the "[GA4] Custom dimensions and metrics" page.

GA4 limits the length of event parameter names & event parameter values. See [GA4] Collection and configuration limits for more information. In your case, LOG_MESSAGE is the event parameter's name (limited to 40 characters), and the runtime value of "$source $logMessage" is the event parameter's value (limited to 100 characters).

If "$source $logMessage" needs to be more than 100 characters, you could make the source and logMessage separate event parameters. For example, you'd update your code to:

bundle.putString("LOG_MESSAGE_SOURCE", source)
bundle.putString("LOG_MESSAGE_VALUE", logMessage)

Then, you would register LOG_MESSAGE_SOURCE and LOG_MESSAGE_VALUE as two event-scoped custom dimensions, and each would be limited to 100 characters individually.

Thanks,
Brett Sneed
The Google Analytics Team

Related