【问题标题】:GA4 and Firebase don't show revenueGA4 和 Firebase 不显示收入
【发布时间】:2021-09-10 12:50:23
【问题描述】:

我有一个 Firebase 帐户,其项目包含两个应用:android 和 ios。最近,我将 Firebase 项目与 Google Analytics 4 帐户集成,以便跟踪应用内事件。

我还根据以下文档配置了 Firebase SDK:https://developers.google.com/analytics/devguides/collection/ga4/ecommerce(我的应用是电子商务)。

Thera 有很多活动,例如:

  • 添加到购物车
  • 购买

在我的 Firebase 和 Analytics 帐户中,我可以看到用户触发事件的次数,但我看不到购买收入:

google analytics print

虽然我将货币价值视为一个参数,但它并不显示为收入。

我的货币设置为“BRL”,价格参数是一个数字。

【问题讨论】:

    标签: firebase google-analytics google-analytics-firebase


    【解决方案1】:

    我们发现了问题:

    我们的代码没有包含参数“value”。尽管我们收集的是“价格”,但没有“价值”参数,Google 不会确认收入。

    来自谷歌的示例代码:

        gtag('event', 'purchase', {
      affiliation: 'Google Store',
      coupon: 'SUMMER_FUN',
      currency: 'USD',
      items: [{
        item_id: 'SKU_12345',
        item_name: 'jeggings',
        coupon: 'SUMMER_FUN',
        discount: 2.22,
        affiliation: 'Google Store',
        item_brand: 'Gucci',
        item_category: 'pants',
        item_variant: 'black',
        price: 9.99,
        currency: 'USD',
        quantity: 1
      }, {
        item_id: 'SKU_12346',
        item_name: 'jeggings',
        coupon: 'SUMMER_FUN',
        discount: 2.22,
        affiliation: 'Google Store',
        item_brand: 'Gucci',
        item_category: 'pants',
        item_variant: 'gray',
        price: 9.99,
        currency: 'USD',
        quantity: 1
      }],
      transaction_id: 'T_12345',
      shipping: 3.33,
      value: 21.09,
      tax: 2.22
    })
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-06-21
      • 2022-12-15
      • 2021-06-17
      • 1970-01-01
      • 1970-01-01
      • 2021-12-09
      • 1970-01-01
      相关资源
      最近更新 更多