Krishna Gupta
Krishna Gupta

Reputation: 55

Firebase Analytics Log Events

I have 10 events which I am logging to Firebase Analytics. All 10 events have same 4 parameters named Category, Value, Action and Label.(All are text except value which is a int) I see the logged events in Firebase Analytics under "Events". But I cannot see the value of parameters for each event. After some research i figured out that we have to add event parameters from the Firebase console. So i clicked on "Edit Parameter Reporting" and added the four parameters mentioned above which increased the value of Global parameters registered. Now i want to add the same parameters for all remaining 9 events but I cannot figure out a way to use the same global parameter in each event. When i started to add same parameters to all events separately by the time i was in my 4th event the limit(10) for text parameters exceeded.

In short: I want to use same 3 text parameters for all my 10 events. but registering 3 text parameters for all event separately exceeds the text param limit by the time I am at fourth event. I want to see these params value for all events. Please help. Here's how i am logging events:

public static void logAnalyticsEvent(Context context, String eventName, String category, String action, String label, int value){
    FirebaseAnalytics firebaseAnalytics;
    firebaseAnalytics = FirebaseAnalytics.getInstance(context);
    Bundle bundle = new Bundle();
    bundle.putString(AnalyticsConstants.Param.CATEGORY, category);
    bundle.putString(AnalyticsConstants.Param.ACTION, action);
    bundle.putString(AnalyticsConstants.Param.LABEL, label);
    bundle.putInt(AnalyticsConstants.Param.VALUE, value);
    firebaseAnalytics.logEvent(eventName,bundle);
}

The events logged by this are visible in Firebase Analytics under Events tab but clicking on event I am unable to see the value of the parameters.

Upvotes: 4

Views: 2154

Answers (1)

Jan-Dawid Roodt
Jan-Dawid Roodt

Reputation: 539

I got around the issue of category and action by concatenating them to the event name.

ie settings_edit_pressed = (category)_(event name)_action

But at the end of the day you still need label to show differences in that action. You can't concatenate label because you'll have millions of events each named alert_input_xxxxx

So if you don't need label or value then hopefully this helps but this certainly isn't a good answer if you need dynamic changes :(

Apparently BigQuery might be another solution but I don't know if you have access to parameters that exceeded the global limits.

Upvotes: 1

Related Questions