I have installed this library for my react-native project and it works fine, but when I use logPurchase event it firebase table price always is 0. I also tried to add hardcoded value but it also doesnt't work. So what's going wrong? Because I can't fine any solution.
import analytics from '@react-native-firebase/analytics';
async sendPurchaseAnalytics() {
const { order} = this.state;
const tax = order?.data?.totalRevenue - order?.data?.totalExclTax;
const items = order?.products.map(product => {
return {
item_brand: product?.vendorName,
item_id: product?.prodlevid,
item_name: product?.name,
price: +product?.sprice,
quantity: product?.quantity,
}
})
await analytics().logPurchase({
value: +order?.total,
currency: 'euro',
tax: +tax?.toFixed(2),
items,
});
}
But Item revenue column is always 0;