ガイド
インストールリファラーのチュートリアル
インストールリファラーを使用するには @capgo/capacitor-install-referrer
@capgo/capacitor-install-referrer Capacitor アプリのインストール Attribution シグナルを読み取る
Android と Apple AdServices 属性トークンを iOS の 1 つの API を通じて Google Play インストールリファラー データを取得する必要がある場合に使用してください。
インストール
bun add @capgo/capacitor-install-referrer
bunx cap sync
このプラグインが公開するもの
getReferrer__CAPGO_KEEP_0__ または iOS のインストール Attribution の詳細を返します。GetReferrer__CAPGO_KEEP_2__ から __CAPGO_KEEP_3__ への移行のために、非推奨の互換性のためのエイリアスです。cap-play-install-referrer.- Android では、Play リファラー文字列、クリックタイムスタンプ、インストールタイムスタンプ、およびインスタントアプリフラグを返します。
- iOS では、AdServices 属性トークンを返し、オプションで Apple の Attribution ペイロードを取得できます。
例の使用
import { InstallReferrer } from '@capgo/capacitor-install-referrer';
const result = await InstallReferrer.getReferrer();
if (result.platform === 'android') {
console.log(result.referrer);
}
if (result.platform === 'ios') {
console.log(result.attributionToken);
}
__CAPGO_KEEP_0__のAttribution Payload
const result = await InstallReferrer.getReferrer({
fetchAppleAttribution: true,
appleAttributionRetryCount: 3,
appleAttributionRetryDelayMs: 5000,
});
console.log(result.appleAttribution);
プラットフォームの注記
AndroidはGoogle Play Install Referrerサービスを使用し、実際のリファラー データのためにPlay Storeのインストールが必要です。iOSはApple AdServicesを使用します。AppleはApp Storeのインストールのための一般的なリファラーの代替品を提供していないためです。
フル リファレンス
- GitHub: https://github.com/Cap-go/capacitor-install-referrer/
- ドキュメント: /docs/plugins/install-referrer/
capgoから続けてください: @capgo/capacitor-install-referrer
__CAPGO_KEEP_0__を使用している場合 @capgo/capacitor-install-referrerを使用 __CAPGO_KEEP_0__を使用してnativeプラグインの作業を計画する場合、接続する @capgo/capacitor-install-referrer @capgo/capacitor-install-referrerの実装詳細 Getting Started Getting Startedの実装詳細 Capgo プラグインディレクトリ Capgo プラグインディレクトリの製品ワークフロー Capacitor Plugins by Capgo Capacitor プラグインのCapgoによる実装詳細 プラグインの追加または更新 プラグインの追加または更新の実装詳細