Getting Started
このプラグインのインストールステップとフルマークダウンガイドのセットアッププロンプトをコピーする
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-install-referrer`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/install-referrer/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」のセクションCapgoのAIアシストセットアップを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを実行してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用してください。
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-install-referrer` plugin in my project.Manualセットアップを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。
bun add @capgo/capacitor-install-referrerbunx cap syncインポート
セクション「インポート」import { InstallReferrer } from '@capgo/capacitor-install-referrer';Attribution データの詳細を読む
セクション「Attribution データの詳細を読む」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);}iOS で Apple の Attribution エンドポイントを取得する
セクション「iOS で Apple の Attribution エンドポイントを取得する」Apple の Attribution エンドポイントを呼び出すには、native code に Apple のエンドポイントを渡します。 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 は、Attribution データが有効なトークンに対して準備中の場合に、Attribution データを返します。 404 有効なトークンに対して Attribution データが準備中の場合、native プラグインは、再試行のオプションを設定して、再試行する頻度を制御します。詳細は iOS 属性 プラットフォームの詳細については。
互換性のアリエース
「互換性のアリエース」セクションGetReferrer() Capacitor からアプリを移行している場合は利用できます。 cap-play-install-referrer.
const result = await InstallReferrer.GetReferrer();New code should use getReferrer().
Capacitor からアプリを移行している場合は利用できます。
Capacitor からアプリを移行している場合は利用できます。Capacitor からアプリを移行している場合は利用できます。 Capacitor からアプリを移行している場合は利用できます。 Capacitor からアプリを移行している場合は利用できます。 使用@capgo/capacitor-install-referrer 使用@capgo/capacitor-install-referrer Capgo プラグイン ディレクトリ Capgo プラグイン フロー Capacitor プラグイン(Capgo) for the implementation detail in Capacitor Plugins by Capgo, プラグインの追加または更新 Ionic Enterprise プラグインの代替 編集 前へ