1

I’ve been able to integrate Google Analytics into my Android app, but am stuck with campaign tracking. In GA, I see page views, events, and custom variables, but campaign referrals never appear. Is there an additional step that is not documented at code.google.com/mobile/analytics/docs/android? like additional permissions specific to referals? Could be something obvious that I should know, I'm new to Android. Here’s my manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.mytestapp.ga"
  android:versionCode="4"
  android:versionName="4.0">
   <uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:icon="@drawable/icon"
             android:label="@string/app_name">

<activity android:name="com.mytestapp.ga.MyActivity"
          android:launchMode="standard">
  <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
  </intent-filter>
</activity>

<!-- Used for install referrer tracking -->
<receiver android:name="com.google.android.apps.analytics.AnalyticsReceiver"
          android:exported="true">
  <intent-filter>
    <action android:name="com.android.vending.INSTALL_REFERRER" />
  </intent-filter>
</receiver>

Jack Case
  • 329
  • 2
  • 13
  • to clarify, additional steps I took: 1. published app to market 2. created a web link using the form in the GA docs 3. installed the app from different android s and confirmed that the other GA tracking was working. referrer=utm_source%3Dsource%26utm_medium%3Dmedium%26utm_campaign%3Dname – Jack Case Aug 29 '11 at 18:12
  • This may help: http://stackoverflow.com/questions/3817030/get-android-google-analytics-referrer-tag – CrackerJack9 Aug 29 '11 at 18:39
  • thanks CrackerJack9, I'll try that approach. Do you know where the Utility class came from in that code? – Jack Case Aug 29 '11 at 19:20
  • no, looks like he just wrote one to parse parameter name/values in the url's query string. – CrackerJack9 Aug 29 '11 at 19:24
  • anything like this should work, i'm sure there are tons of examples out there: http://www.source-code.biz/snippets/java/10.htm – CrackerJack9 Aug 29 '11 at 19:28

1 Answers1

0

Try testing it out:

https://developers.google.com/analytics/solutions/testing-play-campaigns

And then look at the troubleshooting section if it doesn't work. One thing I forgot was to add the bits of java code. I sortof missed the part where you have to get Google Analytics in general to work first, but it sounds like you have that part covered.

orblivion
  • 446
  • 3
  • 12