谷歌Analytics(分析)V2不记录从Android应用统计(Google Analytics

2019-08-02 21:57发布

我使用的EasyTracker从SDK为Android V2.0测试版3.我已经按照在描述的所有步骤https://developers.google.com/analytics/devguides/collection/android/v2/ ,并确保了有连字符和不带我ga_trackingId参数值破折号。

我已经尽我在模拟器应用两者的Android 2.2和4.1.2,以及作为一个真正的设备上。 下面是从logcat的(部分删节)输出:

11-17 20:13:50.587: W/GAV2(542): Thread[main,5,main]: Connection to service failed 1
11-17 20:13:50.616: W/GAV2(542): Thread[main,5,main]: Need to call initialize() and be in fallback mode to start dispatch.
11-17 20:13:50.616: I/GAV2(542): Thread[main,5,main]: ExceptionReporter created, original handler is com.android.internal.os.RuntimeInit$UncaughtHandler
11-17 20:13:52.617: I/GAV2(542): Thread[GAThread,5,main]: No campaign data found.
11-17 20:13:52.646: I/GAV2(542): Thread[GAThread,5,main]: putHit called
11-17 20:13:55.606: I/GAV2(542): Thread[Service Reconnect,5,main]: connecting to Analytics service
11-17 20:13:55.616: I/GAV2(542): Thread[Service Reconnect,5,main]: connect: bindService returned false for Intent { act=com.google.android.gms.analytics.service.START (has extras) }
11-17 20:13:55.616: W/GAV2(542): Thread[Service Reconnect,5,main]: Connection to service failed 1
11-17 20:13:55.616: I/GAV2(542): Thread[Service Reconnect,5,main]: falling back to local store
11-17 20:13:55.635: I/GAV2(542): Thread[GAThread,5,main]: Sending hit to store
11-17 20:13:55.666: I/GAV2(542): Thread[GAThread,5,main]: PowerSaveMode initiated.
11-17 20:13:55.696: I/GAV2(542): Thread[GAThread,5,main]: PowerSaveMode terminated.
11-17 20:13:55.696: V/GAV2(542): Thread[GAThread,5,main]: dispatch running...
11-17 20:13:55.746: I/GAV2(542): Thread[GAThread,5,main]: User-Agent: GoogleAnalytics/2.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91)
11-17 20:13:55.746: I/GAV2(542): Host: www.google-analytics.com
11-17 20:13:55.746: I/GAV2(542): GET /collect?ul=en-us&sr=480x800&a=935594353&sc=start&aid=com.xxx.android&cid=2b8c0c5de52ba05e&av=1.0&v=1&t=appview&an=xxx&tid=UA-xxx-55&_u=.nUWlMB&_v=ma1b3&cd=com.xxx.android.MainActivity&qt=5123&z=184 HTTP/1.1
11-17 20:13:56.116: V/GAV2(542): Thread[GAThread,5,main]: sent 1 of 1 hits
11-17 20:13:56.126: I/GAV2(542): Thread[GAThread,5,main]: PowerSaveMode initiated.
...
11-17 20:15:09.206: V/GAV2(542): Thread[GAThread,5,main]: dispatch running...
11-17 20:15:09.206: V/GAV2(542): Thread[GAThread,5,main]: ...nothing to dispatch
11-17 20:15:09.256: I/GAV2(542): Thread[GAThread,5,main]: putHit called
11-17 20:15:09.256: I/GAV2(542): Thread[GAThread,5,main]: Sending hit to store
11-17 20:15:09.316: I/GAV2(542): Thread[GAThread,5,main]: PowerSaveMode terminated.
11-17 20:15:11.706: V/GAV2(542): Thread[GAThread,5,main]: dispatch running...
11-17 20:15:11.716: I/GAV2(542): Thread[GAThread,5,main]: User-Agent: GoogleAnalytics/2.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91)
11-17 20:15:11.716: I/GAV2(542): Host: www.google-analytics.com
11-17 20:15:11.716: I/GAV2(542): GET /collect?v=1&ul=en-us&t=appview&sr=480x800&an=xxx&a=448166238&tid=UA-xxx-55&aid=com.xxx.android&cid=2b8c0c5de52ba05e&_u=.sB&av=1.0&_v=ma1b3&cd=com.xxx.android.ProductActivity&qt=2500&z=185 HTTP/1.1
11-17 20:15:11.986: V/GAV2(542): Thread[GAThread,5,main]: sent 1 of 1 hits
11-17 20:15:12.006: I/GAV2(542): Thread[GAThread,5,main]: PowerSaveMode initiated.

我已经通过所有相关的帖子上了SO。

根据这样的: http://blog.blundell-apps.com/google-analytics-common-problems-and-fixes/ ,是我看到的事实“...没有派遣”表示数据被发送。

我不关心“连接到服务失败1”的警告,因为它一直没有停止被记录为其他人的数据分析(stackoverflow.com/questions/13222468/android-google-analytics-connection-to-service-失败)。

这里是我的analytics.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="https://schemas.android.com/tools" tools:ignore="TypographyDashes">
    <string name="ga_trackingId">UA-xxx-55</string>
    <bool name="ga_autoActivityTracking">true</bool>
    <bool name="ga_reportUncaughtExceptions">true</bool>
    <integer name="ga_dispatchPeriod">2</integer>
    <bool name="ga_debug">true</bool>
</resources>

我的基本活动的一部分:

public class BaseActivity extends ActionBarActivity {
    @Override
    public void onStart() {
        super.onStart();
        EasyTracker.getInstance().activityStart(this);
    }

    @Override
    public void onStop() {
        super.onStop();
        EasyTracker.getInstance().activityStop(this);
    }
}

现在的问题是,为什么我的数据仍然没有出现在谷歌Analytics(分析)? 我已经等了必要的24-48小时,它仍然是空的。

一个问题解答相关的问题是:如果我直接从浏览器或从提琴手调用此URL:http:// www.google-analytics.com/collect?v=1&ul=en-us&t=appview&sr=480x800&an=xxx&a=1825278197&tid = UA-XXX-55&AID = com.xxx.android&CID = 2b8c0c5de52ba05e&_U = .sB&AV = 1.0&_v = ma1b3&CD = com.xxx.android.ProductActivity&QT = 2414&Z = 141,如果命中被记录? (该响应是一个1x1 GIF图像。)如果是这样,那么,可能有助于隔离出问题向分析帐户设置,以某种方式。 (我使用这个帐户为许多其他网站和网络跟踪工作正常。)

编辑:如果logcat的这个版本展“HTTP响应代码:200”,因为这个职位和布伦德尔一个连接到上面暗示,尽管出于什么似乎的EasyTracker的早期版本:www.asgarddesigns.com.au/2012/05 /的EasyTracker - 谷歌 - 分析集成换的Android /? 矿井没有,但我怀疑这可能是因为从最新的版本中删除此日志信息。

Answer 1:

随着谷歌Analytics(分析)SDK Android和iOS 2.0版本,您需要使用App类型可以看到正在收集和报告的数据来创建GA新的配置文件

这是不是真的,但强调你会发现它的描述迁移指南例如。

这意味着,这将打破自1.x的版本数据的历史,但数据采集和报告差别太大混合在一起,至少在他们在测试阶段。



文章来源: Google Analytics V2 not recording stats from Android app