value parameter not displayed

2019-08-29 23:47发布

问题:

i've logged a firebase event using the code below in android (a long time ago).

mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle params = new Bundle();
params.putString(FirebaseAnalytics.Param.VALUE, String.valueOf(subjectvalue));
params.putString(FirebaseAnalytics.Param.CURRENCY, "IRR");
mFirebaseAnalytics.logEvent("Calculate_Cost_of_Hearing", params);

as you can see in this image the events are being logged and sent to firebase and shown separately but the value indicator still shows zero. should i change my code in order to make it show the values or should i play with the options ? and my ultimate goal is to know the average values not just the SUM.

回答1:

I am pretty sure that Value displays 0 because the parameter is bundled as a String. If you use params.putDouble() or putLong() instead of putString() the value should accumulate in the Firebase console.

You will not be able to display the average value per user in the event view since it shows only the accumulated value. If you want to work with the data you will have to connect your Firebase instance to BigQuery, pretty much.

Perhaps you could get the Value included in the "revenue per user" - metric on the Dashboard if you make the event count as revenue, but I have no experience doing that.