Android install_referrer gives incorrect utm_source and information
I'm trying to use INSTALL_REFERRER
on Android 2.2, and my broadcast receiver is getting called so I know my AndroidManifest.xml is correct. However, the information being passed to my receiver is not what I'm putting in the URL. To me, it looks like default Android Market info and its ignoring the parameters in the URL generated by Google.
Here's my receiver:
public void onReceive(Context context, Intent intent) {
String referrer = URLDecoder.decode(intent.getStringExtra("referrer"));
Log.d("TEST_RCVR", referrer);
}
Here's the log output:
02-16 05:22:06.095: DEBUG/TEST_RCVR(24599): utm_source=androidmarket&utm_medium=device&utm_campaign=search&utm_term=arbitrary software&rowindex=4&hl=en&correctedQuery=
On my Android device, I opened a browser to the Google Analytics site and had it generate a URL for me. I pasted it into the Android browser so it took me to the right place in the Market, I installed my app just fine, but the output doesnt match whats in the URL.
Here's the URL Google made for me that I pasted into the Android browsers address bar... https://market.android.com/details?id=com.arbitrarysoftware.test&referrer=utm_source%3Dcampsrc%26utm_medium%3Dmedium%26utm_term%3Dterm%26utm_content%3Dcontent%26utm_campaign%3Dnamed
I'm really interested in getting the utm_source to be ANYTHING other than "androidmarket." I'm clearly not understanding why the Android Market overrode / ignored my settings. In my mind, I referred myself to the Market 开发者_开发技巧through the browser so they should be honoring my utm_source.
I've run into this before.
It could be one of 2 things: 1] Make sure you've published the newest APK you've uploaded to the android marketplace (obvious I know, but if you don't hit the save button after you've uploaded to the marketplace, that new APK won't ever show up).
2] Make sure you're downloading and installing the newest version. Sometimes it takes up to 5 hours for me to see the latest version on the marketplace. If you've uploaded version 1.1, for instance, the android marketplace page you hit should have the 1.1 version in it. It appears on the web and on the in-app marketplace at different times for me, so it's a bit of a waiting game.
That should ensure that you see the changes you've made, as they do look correct. Another trick I do is make a slight text change (assuming it's a demo app), to ensure that you can tell you've downloaded and installed the newest version.
-Sig
精彩评论