android - Play Install Referrer Library 在 Play Store live 应用程序中不起作用
问题描述
对于我们的应用,我最近包含了 Play Install Referrer 库,用于在应用安装后获取引用链接,完全按照Google在此页面中列出的所有步骤进行操作。然后我们将其存储在我们的数据库中,以了解用户如何找到我们的应用程序。
当我从 Android Studio 上传应用程序时,一切正常。但是,当我将应用程序上传到 Play 商店时,没有将引用链接保存到数据库中,尽管该应用程序被下载了很多次。
有谁知道这里出了什么问题?任何帮助将非常感激。
编辑:从今天开始,我们只获得utm_source=(not%20set)&utm_medium=(not%20set)
引荐链接。我可以从这篇文章中看到为什么会发生这种情况,但为什么我们只将这些链接放入我们的数据库中?因为还有更多来自其他来源的安装。
解决方案
事实证明,我在想使用 Play Install Referrer 的同时使用了 Analytics 中的 Campaign Measurement。从教程中删除以下调用为我解决了这个问题:
// Tracker for Classic GA (call this if you are using Classic GA only)
private void trackInstallReferrer(final String referrerUrl) {
new Handler(getMainLooper()).post(new Runnable() {
@Override
public void run() {
CampaignTrackingReceiver receiver = new CampaignTrackingReceiver();
Intent intent = new Intent("com.android.vending.INSTALL_REFERRER");
intent.putExtra("referrer", referrerUrl);
receiver.onReceive(getApplicationContext(), intent); // I suspect this line was causing the troubles
}
});
}
推荐阅读
- docker - docker容器之间的连接作为本地主机
- git - 为什么我无法连接到 Git,即使它以前工作过?
- terraform - Terraform 计划/应用到可读文件中?
- mysql - 如何使用 GROUP BY 和 INNER JOIN 计算所有当前日期记录总数和以前日期记录总数之间的差异?
- amazon-s3 - 哪种文件格式适合非结构化数据?
- reactjs - 为什么我不能从 Material UI 颜色中导入“白色”颜色?
- c# - “InvalidOperationException - 对象当前正在其他地方使用” Instance cls &Thread Using
- reactjs - 条件图像 src 渲染反应
- python - 如何在不更改数据框熊猫中的其他值的情况下替换行值?
- php - 我无法使用 jwt 验证用户