メイン コンテンツにスキップ
プラグインに戻る
@capgo/capacitor-install-referrer
チュートリアル
@capgo/capacitor-install-referrer

Install Referrer

Google Play のインストールリファラーと Apple AdServices のAttribution を読み取る Capacitor

ガイド

Install Referrerのチュートリアル

デバイスでテスト

Download the Capgo app, then scan the QR code.

Install Referrer プラグイン プレビュー QR code

Using @capgo/capacitor-install-referrer

@capgo/capacitor-install-referrer Capacitor アプリ内でインストール Attribution シグナルを読み取ります。

Google Play インストール Referrer データと iOS の Apple AdServices 属性トークンを一つの API で取得する必要がある場合に使用してください。

インストール

bun add @capgo/capacitor-install-referrer
bunx cap sync

このプラグインが提供するもの

  • getReferrer Android または iOS のインストール Attribution の詳細を返します。
  • GetReferrer Android の古いバージョンの互換性用のデプロケーションです。Android から __CAPGO_KEEP_0__ に移行するために使用してください。 cap-play-install-referrer.
  • Android では、Play referrer の文字列、クリックタイムスタンプ、インストールタイムスタンプ、およびインスタントアプリフラグを返します。
  • iOS では、AdServices 属性トークンを返し、オプションで Apple の Attribution Payload を取得できます。

使用例

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

Apple Attribution Payload

const result = await InstallReferrer.getReferrer({
  fetchAppleAttribution: true,
  appleAttributionRetryCount: 3,
  appleAttributionRetryDelayMs: 5000,
});

console.log(result.appleAttribution);

プラットフォームに関する注意事項

Androidでは、Google Play インストール リファラサービスを使用し、リアルなリファラデータのためにPlayストアのインストールが必要です。iOSでは、Apple AdServicesを使用します。なぜなら、AppleはApp Storeのインストールリファラの一般的な代替品を提供していないからです。

フルリファレンス

使用中の@capgo/capacitor-install-referrerから続けてください

あなたが使用中の場合 使用中の@capgo/capacitor-install-referrer nativeプラグインの作業を計画するために、@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-install-referrerを接続してください @capgo/capacitor-install-referrerの実装詳細を参照してください @capgo/capacitor-install-referrer スタート Capgoプラグインディレクトリ Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and Capgoアプリをパワーアップさせる 150+の実稼働用プラグイン