Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

226
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda