Android Google Analytics Campaign tracking not appearing
Asked Answered
A

1

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>

Aldine answered 29/8, 2011 at 17:57 Comment(5)
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. <snip>referrer=utm_source%3Dsource%26utm_medium%3Dmedium%26utm_campaign%3DnameAldine
This may help: #3817530Crystallite
thanks CrackerJack9, I'll try that approach. Do you know where the Utility class came from in that code?Aldine
no, looks like he just wrote one to parse parameter name/values in the url's query string.Crystallite
anything like this should work, i'm sure there are tons of examples out there: source-code.biz/snippets/java/10.htmCrystallite
C
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.

Crusade answered 24/3, 2014 at 18:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.