谷歌分析HitBuilder addProduct无效

时间:2017-04-05 11:37:06

标签: android google-analytics analytics

我正在向GA Hitbuilder添加产品它工作正常,但数据没有反映在仪表板中,但以下是我的代码

com.google.android.gms.analytics.ecommerce.Product product = new com.google.android.gms.analytics.ecommerce.Product();
                        product.setId(dealItem.dealId)
                                .setName(dealItem.title)
                                .setCategory(dealItem.dealCategory)
                                .setPrice(Double.parseDouble(dealItem.dealPrice))
                                .setCouponCode(dealItem.couponCode)
                                .setCustomDimension(14, dealItem.store)
                                .setCustomDimension(16, "test")
                                .setCustomMetric(7, (int) 1.2);
                        tracker.send(new HitBuilders.EventBuilder()
                                .setCategory("ui_action")
                                .setAction("deal_redirect")
                                .setLabel(dealItem.dealId)
                                .addProduct(product)
                                .setCustomDimension(Constants.GA_CUSTOM_DIMENSION_PARTNER_ID, "pid")
                                .build()
                        );

以下是GA Log

04-05 16:32:18.290 D/GAv4    (10102): Hit delivery requested: 
 ht=1491390138201, _s=39, _v=ma10.2.98, a=2021803436, 
 adid=f9295aa5-f383-4835-b3d8-d50d4aabd666, 
 aid=in.ss.ss, an=ss, ate=1, av=8.0.1, 
 cd=MainActivity, cd2=mx, cid=213c230a-e45f-4930-a70f-37c57ca2cb5d, 
 ea=deal_redirect, ec=ui_action, el=4rv90qtsihl4l, pr1ca=headphone, 
 pr1cc=, pr1cd14=flipkart, pr1cd16=test, pr1cm7=1, 
 pr1id=4rv90qtsihl4l, pr1nm=JBL T250SI Stereo Wired Headphones, 
 pr1pr=749.0, sf=100.0, sr=1080x1776, t=event, tid=UA-30398300-2, 
 ul=en-us, v=1
04-05 16:32:18.376 D/GAv4    (10102): Hit sent to the device AnalyticsService for delivery

我还在Google Analytics分析仪表板中启用了电子商务设置,但仪表板中仍然没有可用的数据。我可以在Google Analytics分析仪表板中查看产品详细信息

0 个答案:

没有答案