【发布时间】:2013-08-22 02:50:11
【问题描述】:
刚开始在我的 Android 应用程序中实施 Google Analytics V2,虽然我遇到了麻烦。
我相信我已经正确设置了包含属性和配置文件的帐户。 我在 analytics.xml 文件中提供了我的密钥,并且在每个活动中我使用了
EasyTracker.getInstance().activityStart(this); 在 onStart 方法中
和
EasyTracker.getInstance().activityStop(this); 在每个活动的 onStop 方法中。
但是,我似乎在 Google Analytics(分析)网站上没有看到任何结果。此外,我打开了调试选项,我可以在 log cat 中看到来自 Gav2(Google Analytics)的各种消息,暗示存在问题。
例如
11-04 21:56:48.000: W/GAV2(6376): Thread[main,5,main]: **Connection to service failed 1**
11-04 21:56:48.040: W/GAV2(6376): Thread[main,5,main]: **Need to call initialize() and be in fallback mode to start dispatch.**
11-04 21:56:48.050: I/GAV2(6376): Thread[main,5,main]: ExceptionReporter created, original handler is com.keypod.utils.AppCrashExceptionHandler
11-04 21:56:50.055: I/GAV2(6376): Thread[GAThread,5,main]: No campaign data found.
11-04 21:56:50.060: I/GAV2(6376): Thread[GAThread,5,main]: putHit called
11-04 21:56:50.410: I/GAV2(6376): Thread[GAThread,5,main]: putHit called
11-04 21:56:53.035: I/GAV2(6376): Thread[Service Reconnect,5,main]: connecting to Analytics service
11-04 21:56:53.035: I/GAV2(6376): Thread[Service Reconnect,5,main]: connect: bindService returned false for Intent { act=com.google.android.gms.analytics.service.START (has extras) }
**11-04 21:56:53.035: W/GAV2(6376): Thread[Service Reconnect,5,main]: Connection to service failed 1
11-04 21:56:53.035: I/GAV2(6376): Thread[Service Reconnect,5,main]: falling back to local store**
11-04 21:56:53.040: I/GAV2(6376): Thread[GAThread,5,main]: Sending hit to store
11-04 21:56:53.100: I/GAV2(6376): Thread[GAThread,5,main]: Sending hit to store
11-04 21:56:53.150: V/GAV2(6376): Thread[GAThread,5,main]: dispatch running...
它似乎无法连接,然后它“回退”到本地商店。 难道我做错了什么?还是我应该忽略该警告并等待结果显示在网站上?
我按照 Google 的指南一步一步地进行操作。
谢谢!
【问题讨论】:
-
我的日志中缺少这些 dwp 行:11-04 21:56:50.060: I/GAV2(6376): Thread[GAThread,5,main]: putHit called 11-04 21:56: 50.410: I/GAV2(6376): 线程[GAThread,5,main]: putHit 调用