I needed to track install information, so i used
com.android.vending.INSTALL_REFERRER intent for google
analytics:
http://code.google.com/mobile/analytics/docs/android/

I have put that intent into manifest as following:

<receiver android:name="com.mycompany.MyReceiver"
android:exported="true">
  <intent-filter>
    <action android:name="com.android.vending.INSTALL_REFERRER" />
  </intent-filter>
</receiver>


Inside MyReceiver class, i've implemented:

        public void onReceive(Context context, Intent intent) {
            String referrer =
URLDecoder.decode(intent.getStringExtra("referrer"));
            Log.d(TAG, referrer);

            com.google.android.apps.analytics.AnalyticsReceiver
receiver = new com.google.android.apps.analytics.AnalyticsReceiver();
            receiver.onReceive(context, intent);
         }

Then i installed app using generated at
http://code.google.com/mobile/analytics/docs/android/#android-market-tracking
url, and got this in log:

DEBUG/TestApplication(31977):
utm_source=androidmarket&utm_medium=device&utm_campaign=search&utm_term=pname:com.mycompany.test.market&rowindex=0&hl=en&correctedQuery=
WARN/googleanalytics(31532): Badly formatted referrer missing
campaign, name or source
WARN/googleanalytics(31532): Badly formatted referrer, ignored

So, instead of referral data that was given at url generation, i've
got data which looks like i was searching for my app at Market

Does anyone have this kind of trouble, or knows how to help?




-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to