Google Analytics for Android v2 Campaign Tracking Not Working

I have spent a ton of time on this, and am now pulling my hair out. I am using the Google Analytics Android SDK v2. I have been using it for months, and have collected data using EasyTracker . No issues there.

I recently tried to implement Campaign Tracking, and everything seemed okay, but after weeks in the market even with hundreds of referral downloads, I saw no data. I recently looked into how to test it and found this: stackoverflow.com/questions/5890914/how-to-test-android-referral-tracking

I am using the v2 service, so in my AndroidManifest.xml, I added this:

<!-- Used for install referral measurement -->
    <service android:name="com.google.analytics.tracking.android.CampaignTrackingService" />

    <receiver
        android:name="com.google.analytics.tracking.android.CampaignTrackingReceiver"
        android:exported="true" >
        <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER" />
        </intent-filter>
    </receiver>

source: https://developers.google.com/analytics/devguides/collection/android/v2/

I have no other receivers for INSTALL_REFERRER .

When I run the test from ADB, I get no logs of any kind from my app. When I just install the app and observe Logcat, I see the following, which seems to indicate something is at least hooked up:

03-22 16:11:10.412: W/GAV2(12444): Thread[GAThread,5,main]: Service unavailable (code=1), will retry.
03-22 16:11:10.443: I/GAV2(12444): Thread[GAThread,5,main]: No campaign data found.
03-22 16:11:15.420: W/GAV2(12444): Thread[Service Reconnect,5,main]: Service unavailable (code=1), using local store.

Please help me figure out what I am missing here. This seems much harder than it should be. Thanks!


While I was unable to test it, once I put it in the Google Play market and tested, it works. Horrible way to validate, but it looks like this issue is resolved for me.

If it helps anyone, I had a version of the analytics library built at 12:05am. When I went back to their site to redownload, it was built on the same day, but at 9:24am. Seems like I had a bad version which I was unlucky enough to download before they fixed it.

链接地址: http://www.djcxy.com/p/70276.html

上一篇: 骨干事件不起作用

下一篇: Google Analytics for Android v2广告系列跟踪无效