コンテンツに進む

Getting Started

GitHub

CapgoのAI-Assistedセットアップを使用してプラグインをインストールできます。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 Setup を好みますか? 以下のコマンドを実行し、下記のプラットフォーム固有の手順に従ってプラグインをインストールしてください。

ターミナルウィンドウ
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);
}

iOS で Apple の Attribution エンドポイントを呼び出すには、

「iOS で Apple の Attribution エンドポイントを呼び出すには」セクション

code 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);

有効なトークンに対してAttributionデータが準備中の場合、Appleは返します。 404 リトライオプションは、ネイティブプラグインが拒否する前に何度リトライするかを制御します。詳しくは iOSAttribution を参照してください。

プラットフォームの詳細については

iOSAttribution

GetReferrer() を参照してください。 cap-play-install-referrer.

const result = await InstallReferrer.GetReferrer();

New code should use getReferrer().

Capgoを使用している場合 はじめに ネイティブプラグインの作業を計画するには、 @capgo/capacitor-install-referrerを使用します。 @capgo/capacitor-install-referrerのネイティブ機能の使用 Capgo プラグインディレクトリ for the product workflow in Capgo Plugin Directory, Capacitor プラグインは Capgo によって提供されます。 Capgoのプラグインの実装詳細については、CapacitorプラグインによってCapgoで実装されます。 Ionic Enterprise Pluginの代替 __CAPGO_KEEP_0__ __CAPGO_KEEP_1__ Ionic Enterprise プラグイン代替製品のワークフローについて。