在用户同意的情况下将引荐来源网址传递给第三方指标库



根据 Google Play 的开发者计划政策,开发者

  • 获得肯定同意之前,不得开始收集个人或敏感数据;

不过,目前,我们使用三种不同的第三方服务跟踪用户安装:Branch.io、Mixpanel 和 AppsFlyer。我的AndroidManifest.xml上注册了BroadcastReceiver

<receiver
android:name="org.example.InstallListener"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>

BroadcastReceiver 的代码是这样的:

public class InstallListener extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// Mixpanel
InstallReferrerReceiver mixpanelReferrerTracking = new InstallReferrerReceiver();
mixpanelReferrerTracking.onReceive(context, intent);
// Branch.io
InstallListener branchIoReferrerTracking = new InstallListener();
branchIoReferrerTracking.onReceive(context, intent);
// AppsFlyer
SingleInstallBroadcastReceiver appsFlyerReferrerTracking = new SingleInstallBroadcastReceiver();
appsFlyerReferrerTracking.onReceive(context, intent);
}
}

这是基于 AppsFlyer 注册多个安装跟踪器的指南。

现在的问题是,如果我们要遵守上述Google Play政策,在将引荐来源网址数据发送到我们的第三方库之前,我们如何获得用户的同意?

据我了解,com.android.vending.INSTALL_REFERRER在从 Google Play 安装时由BroadcastReceiver广播和接收,所以我想这可能是在我甚至可以启动对话框以征求用户同意之前的任何时间。

安装跟踪数据是策略所引用的个人或敏感数据的一部分,这是否正确?

我们正在考虑的一种解决方案是在收到广播后将referrer从意图保存到SharedPreferences,然后在获得用户同意后从那里获取它,然后才将其传递给第三方跟踪器。这个解决方案是否正确?

实际上没有必要将数据"独立"存储在SharedPreferences中 - 您只需实现 AppsFlyer SDK 提供的MultipleInstallBroadcastReceiver,并在获得用户同意后保留 SDK 初始化。这可能适用于收集此数据的其他 SDK。

此外,我可以说绝大多数 AppsFlyer 用户都在使用(其中一个)MultipleInstallBroadcastReceiver/SingleInstallBroadCastReceiver接收器,我们从未遇到过任何问题。

附言有点跑题了,但可能是相关的 - 谷歌提供了一种更新/更好/更安全的方式来获取商店的INSTALL_REFERRER:https://developer.android.com/google/play/installreferrer/igetinstallreferrerservice

使用 AppsFlyer,您只需使用 gradle 导入'com.android.installreferrer:installreferrer:1.0'库,AppsFlyer SDK 将完成剩下的工作。

最新更新