Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

225
Views
Why logPurchase event in firereact-native-firebase/analytics return empty price value?

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;

this is image from analytics.google

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!