Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

218
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda