简体   繁体   English

Google Analytics点击已发送但在Analytics控制台上不可见

[英]Google Analytics Hits sent but not visible on Analytics console

I have been trying to implement Google Analytics in my app by following the steps on the official documentation by Google. 我一直在尝试按照Google官方文档中的步骤在我的应用中实施Google Analytics。 After completing the coding part, I moved on to the analytics console to see if I received any hits. 完成编码部分后,我转到分析控制台,看看我是否收到任何点击。 I waited for almost 2 days but did not see any progress. 我等了将近2天,但没有看到任何进展。 I then tried to debug the problem by using GAv4 tag in my logcat. 然后我尝试在我的logcat中使用GAv4标签来调试问题。 I got the following log, 我得到了以下日志,

07-14 11:11:22.734 31016-31016/com.dhinchek.user I/GAv4: Google Analytics 9.0.80 is starting up. To enable debug logging on a device run:
                                                           adb shell setprop log.tag.GAv4 DEBUG
                                                           adb logcat -s GAv4
07-14 11:11:22.760 31016-31016/com.dhinchek.user D/GAv4: setLocalDispatchPeriod (sec): 30
07-14 11:11:22.896 31016-31497/com.dhinchek.user D/GAv4: Sending first hit to property: UA-77779576-2
07-14 11:11:22.898 31016-31497/com.dhinchek.user D/GAv4: Hit delivery requested: ht=1468501882775, _s=0, _v=ma9.0.80, a=239605409, aid=com.dhinchek.user, an=Dhinchek, av=1.4, cd=Splash, cid=0a56ad2b-533b-4a48-84ef-285fbbb6a6f3, sc=start, sf=100.0, sr=720x1280, t=screenview, tid=UA-77779576-2, ul=en-us, v=1
07-14 11:11:22.907 31016-31497/com.dhinchek.user D/GAv4: Hit delivery requested: ht=1468501882797, _s=1, _v=ma9.0.80, a=239605410, aid=com.dhinchek.user, an=Dhinchek, av=1.4, cd=Splash, cid=0a56ad2b-533b-4a48-84ef-285fbbb6a6f3, sf=100.0, sr=720x1280, t=screenview, tid=UA-77779576-2, ul=en-us, v=1
07-14 11:11:23.023 31016-31497/com.dhinchek.user D/GAv4: Hit sent to the device AnalyticsService for delivery
07-14 11:11:23.042 31016-31497/com.dhinchek.user D/GAv4: Hit sent to the device AnalyticsService for delivery
07-14 11:11:26.003 31016-31497/com.dhinchek.user D/GAv4: Hit delivery requested: ht=1468501885946, _s=2, _v=ma9.0.80, a=239605411, aid=com.dhinchek.user, an=Dhinchek, av=1.4, cd=Login, cid=0a56ad2b-533b-4a48-84ef-285fbbb6a6f3, sf=100.0, sr=720x1280, t=screenview, tid=UA-77779576-2, ul=en-us, v=1
07-14 11:11:26.048 31016-31497/com.dhinchek.user D/GAv4: Hit sent to the device AnalyticsService for delivery

I am guessing if the hit is sent to the analytics service then the code is correct, but I am not able to see any progress in the analytics console. 我猜测命中是否发送到分析服务然后代码是正确的,但我无法在分析控制台中看到任何进展。 These two hits are for two different activities in my app. 这两个点击是我的应用程序中的两个不同的活动。 Can anyone help me out on how to further debug this issue, or suggest how to solve this problem? 任何人都可以帮我解决如何进一步调试此问题,或建议如何解决这个问题? All views are welcome. 欢迎所有观点。

Is this running on an emulator without Google Play Services? 这是在没有Google Play服务的模拟器上运行吗? If so, it's probably not sending them, so you may need to allow it to send with the local dispatch fallback. 如果是这样,它可能不会发送它们,因此您可能需要允许它与本地调度回退一起发送。

Or maybe it hasn't been long enough? 或者它可能还不够长? It only sends every 30 minutes by default, then takes the GA report site a few hours for it to show up anyway. 它默认情况下每30分钟发送一次,然后将GA报告网站花费几个小时来显示它。

It may help to review the official GA Dispatch docs that go into more detail and include other similar things you can try. 它可能有助于查看更详细的官方GA Dispatch文档 ,并包含您可以尝试的其他类似内容。

This might be a possible solution I have tried with 这可能是我尝试过的一种可能的解决方案

android version 8.1.104 android版本8.1.104

and

Google analytics version 11.0.2 Google Analytics 11.0.2版

and it works for me 它对我有用

Try updating the above plugin using sdk manager and for Google analytics update specify the version in gradle file 尝试使用sdk管理器更新上述插件,并为Google分析更新指定gradle文件中的版本

dependencies {
  // ...
  compile 'com.google.android.gms:play-services-analytics:11.0.2'
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM