コンテンツにジャンプ

Getting Started

GitHub
ターミナル画面
bun add @capgo/capacitor-install-referrer
bunx cap sync
import { InstallReferrer } from '@capgo/capacitor-install-referrer';
const result = await InstallReferrer.getReferrer();
if (result.platform === 'android') {
console.log('Install referrer:', result.referrer);
console.log('Click timestamp:', result.clickTimestampSeconds);
console.log('Install timestamp:', result.installBeginTimestampSeconds);
}
if (result.platform === 'ios') {
console.log('AdServices token:', result.attributionToken);
}

native codeがAppleのAttributionエンドポイントを呼び出すには fetchAppleAttribution.

const result = await InstallReferrer.getReferrer({
fetchAppleAttribution: true,
appleAttributionRetryCount: 3,
appleAttributionRetryDelayMs: 5000,
});
// result.appleAttribution is the parsed Apple attribution response.
// See the iOS attribution page for the Apple-provided payload fields.
console.log(result.appleAttribution);

Appleから返される 404 attribution データが有効なトークン用に準備されている間は、 attribution データが準備されているかどうか確認します。 再試行のオプションは、ネイティブ プラグインが拒否する前に何度再試行するかを制御します。 iOS 属性 iOS 属性の詳細はこちら

互換性のあるエイリアス

互換性のあるエイリアス

GetReferrer() アプリが cap-play-install-referrer.

const result = await InstallReferrer.GetReferrer();

新しい code は getReferrer().

Getting Started から続けてください

Getting Started から続けてください

あなたが Getting Started ネイティブ プラグインの作業を計画するには、接続する Using @capgo/capacitor-install-referrer ネイティブ機能のために Using @capgo/capacitor-install-referrer を使用します。 Capgo プラグイン ディレクトリ Capgo プラグイン ディレクトリの製品ワークフロー Capacitor プラグインの Capgo Capacitor プラグインの Capgo の実装詳細 プラグインの追加または更新 プラグインの追加または更新の実装詳細 Ionic Enterprise プラグインの代替 Ionic Enterprise プラグインの代替の製品ワークフロー