跳过内容

安卓referrer

GitHub

Google Play Install Referrer

Google Play 安装引荐服务

在 Android 上, getReferrer() 连接 Google Play 安装引荐服务并返回 Play Store 安装记录中的数据.

const result = await InstallReferrer.getReferrer();
console.log(result.referrer);
console.log(result.clickTimestampSeconds);
console.log(result.installBeginTimestampSeconds);
console.log(result.googlePlayInstantParam);

返回的字段

返回的字段
字段描述
platform始终 android.
referrer原始 Play 安装引荐字符串
clickTimestampSeconds客户端引荐点击时间戳(秒)
installBeginTimestampSeconds客户端安装开始时间戳(秒数)。
googlePlayInstantParam用户是否启动了应用的即时体验。
  • 应用必须从Google Play安装才能获取真实安装引荐人数据。
  • 设备必须具有支持Install Referrer服务的Play Store版本。
  • 不需要任何Android运行时权限。

插件在Play Store服务不可用、不支持、断开连接前返回结果或返回的响应不期望时拒绝。

继续从Android引荐

标题:继续从Android引荐

如果您正在使用 Android Referrer 为native插件工作做好准备,连接它与 使用 @capgo/capacitor-install-referrer 为native能力在使用 @capgo/capacitor-install-referrer 中 Capgo 插件目录 为产品工作流程在 Capgo 插件目录 中 Capacitor 由 Capgo 的插件 为实现细节在 Capacitor 由 Capgo 的插件 中 添加或更新插件 为实现细节在添加或更新插件 中,和 Ionic Enterprise插件替代方案 为 Ionic Enterprise Plugin 替代品的产品工作流。