Android install_referrer 提供不正确的 utm_source 和信息

发布于 2024-10-17 14:44:00 字数 1330 浏览 1 评论 0原文

我尝试在 Android 2.2 上使用 INSTALL_REFERRER,并且我的广播接收器被调用,因此我知道我的 AndroidManifest.xml 是正确的。然而,传递给我的接收者的信息并不是我在 URL 中输入的信息。对我来说,它看起来像是默认的 Android Market 信息,并且忽略了 Google 生成的 URL 中的参数。

这是我的接收器:

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

这是日志输出:

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=

在我的 Android 设备上,我打开了 Google Analytics 站点的浏览器,并让它为我生成一个 URL。我将其粘贴到 Android 浏览器中,因此它将我带到市场中的正确位置,我安装了我的应用程序,但输出与 URL 中的内容不匹配。

这是 Google 为我制作的 URL,我将其粘贴到 Android 浏览器地址栏中... https://market.android.com/details?id=com.任意软件.test&referrer=utm_source%3Dcampsrc%26utm_medium%3Dmedium%26utm_term%3Dterm%26utm_content%3Dcontent%26utm_campaign%3Dnamed

我'我真的很感兴趣让 utm_source 成为除“androidmarket”之外的任何东西。我显然不明白为什么 Android 市场覆盖/忽略我的设置。在我看来,我通过浏览器将自己引向市场,因此他们应该尊重我的 utm_source。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

混浊又暗下来 2024-10-24 14:44:00

我以前遇到过这个。

这可能是以下两件事之一:
1]确保你已经发布了你上传到android市场的最新APK(显然我知道,但是如果你上传到市场后没有点击保存按钮,那么新的APK将永远不会出现)。

2]确保您下载并安装最新版本。有时我需要长达 5 个小时才能看到市场上的最新版本。例如,如果您上传了 1.1 版本,则您访问的 Android 市场页面中应该包含 1.1 版本。对我来说,它出现在网络和应用内市场的时间不同,所以这有点等待游戏。

这应该确保您看到所做的更改,因为它们看起来确实正确。我做的另一个技巧是稍微更改文本(假设它是演示应用程序),以确保您可以告诉您已经下载并安装了最新版本。

-信号

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文