iOS Attribution
复制包含安装步骤和该插件完整 Markdown 指南的配置 prompt。
Apple AdServices
标题为 “Apple AdServices” 的章节Apple 没有提供类似于 Google Play Install Referrer 的通用 App Store 安装来源。在 iOS 上,此插件使用 Apple AdServices 归因。
默认情况下, getReferrer() 返回一个 AdServices 归因 token,你可以将其发送到你的后端或移动测量合作伙伴 (MMP)。
const result = await InstallReferrer.getReferrer();console.log(result.attributionToken);原生 Apple 归因查询
标题为 “原生 Apple 归因查询” 的章节该插件还可以通过原生 code 将 token 发送到 Apple 的 AdServices 端点。
const result = await InstallReferrer.getReferrer({ fetchAppleAttribution: true,});
console.log(result.appleAttribution);当 App 本身应接收 Apple 的归因 payload 时,使用此模式。保持 fetchAppleAttribution false(当您的后端或归因服务商需要交换 token 时)。
返回字段
标题为“返回字段”的章节| 字段 | 描述 |
|---|---|
platform | 始终 ios. |
attributionToken | Apple AdServices 归因 token。 |
appleAttribution | 可选的 Apple 归因 payload,当条件 fetchAppleAttribution 为 true 时。 |
- Apple AdServices 归因 Token 在 iOS 14.3 及更高版本中可用。
- 归因负载仅涵盖 Apple Search Ads 归因,不包括任意 App Store 来源 URL。
- 仅请求 AdServices 归因 Token 时,无需显示 App Tracking Transparency 弹窗。
继续 iOS Attribution 教程
标题为“继续 iOS Attribution 教程”的章节如果你正在使用 iOS Attribution 要规划原生插件工作,请将其与 使用 @capgo/capacitor-install-referrer 以使用 @capgo/capacitor-install-referrer 中的原生能力, Capgo 插件目录 查看 Capgo 插件目录中的产品工作流, Capgo 提供的 Capacitor 插件 查看由 Capgo 提供的 Capacitor 插件中的实现细节, 添加或更新插件 关于“添加或更新插件”中的实现细节,以及 Ionic Enterprise 插件替代方案 关于“Ionic Enterprise 插件替代方案”中的产品工作流。