Skip to content Skip to sidebar Skip to footer

Firebase Dashboard Doesn't Show Price In Top Products

In the Firebase dashboard, when looking at the add_to_cart event, I can see the price parameter firing with values succesfully: But then below, in the 'top products' window, I ca

Solution 1:

The events summary in your first screenshot shows the price parameter sent. This could be a string, a number, anything. In your case it's a number.

The products summary in your second screenshot shows the value parameter sent. This must be a monetary value, and is what you should be using.

From the docs:

public static final String VALUE

A context-specific numeric value which is accumulated automatically for each event type. Value should be specified with putLong(String, long) or putDouble(String, double). This is a general purpose parameter that is useful for accumulating a key metric that pertains to an event. Examples include revenue, distance, time, and points. Notes: Values for pre-defined currency-related events (such as ADD_TO_CART) should be accompanied by a CURRENCY param. The valid range of accumulated values is [-9,223,372,036,854.77, 9,223,372,036,854.77]. Supplying a non-numeric value, omitting the corresponding CURRENCY parameter, or supplying an invalid currency code for conversion events will cause that conversion to be omitted from reporting.

 Bundle params = new Bundle();
 params.putDouble(Param.VALUE, 3.99);
 params.putString(Param.CURRENCY, "USD" );  // e.g. $3.99 USD

Post a Comment for "Firebase Dashboard Doesn't Show Price In Top Products"