Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 669
RealCasually Avatar asked Mar 22 '13 23:03

RealCasually


People also ask

Why is my Google Analytics not tracking?

If the goal page is not tagged with tracking code, Analytics does not track this page, and as a result does not track goals. You should also make sure that you've installed the correct tracking code on your pages since the code is specific to each account property.

How do I track a marketing campaign in Google Analytics?

To track your custom marketing campaigns into Google Analytics, you need to use campaign tags (which are also called UTM tags), these tags allow you to see your marketing reported separately in Google Analytics.


1 Answers

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.

like image 137
RealCasually Avatar answered Sep 20 '22 15:09

RealCasually