Google Play Install Referrer
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
您可以使用 Google Play 商店的 Install Referrer API 从 Google Play 安全地检索引荐来源内容,例如:
- 已安装的软件包的引荐来源网址。
- 引荐来源网址点击事件发生时的时间戳(以秒为单位)(客户端和服务器端)。
- 开始安装时的时间戳(以秒为单位)(客户端和服务器端)。
- 首次安装应用时的应用版本。
- 用户在过去 7 天内是否曾与应用的免安装体验互动。
要求
设备上的 Google Play 商店应用提供 Install Referrer API。安装了 Google Play 应用版本 8.3.73 或更高版本的设备自动提供该 API。
您还必须拥有 Google Play 管理中心账号才能使用 Install Referrer API。
使用 API
Install Referrer API 以 Android 接口定义语言 (AIDL) 接口的形式实现。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Google Play Install Referrer\n\nYou can use the Google Play Store's Install Referrer API to securely retrieve referral content\nfrom Google Play, such as:\n\n- The referrer URL of the installed package.\n- The timestamp, in seconds, of when a referrer click happened (both client- and server-side).\n- The timestamp, in seconds, of when an installation began (both client- and server-side).\n- The app's version at the time when the app was first installed.\n- Whether the user has interacted with your app's [instant experience](/topic/google-play-instant/overview) in the past 7 days.\n\nRequirements\n------------\n\nThe Install Referrer API is exposed by the Google Play Store app on a device. Devices with a\nGoogle Play app version of 8.3.73 or later automatically have access to the API.\n\nYou must also have a Google Play Console account to use the Install Referrer API.\n\nUsing the API\n-------------\n\nThe Install Referrer API is implemented as an\n[Android Interface Definition Language (AIDL)](/guide/components/aidl) interface.\n\n- If you are using the Kotlin programming language or the Java programming language, use the [Play Install Referrer Client Library](/google/play/installreferrer/library) to simplify your coding.\n- If you are using another programming language, use the [Play Install Referrer API](/google/play/installreferrer/igetinstallreferrerservice)."]]