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

インストール リファラー

Google Play のインストール リファラー データと Apple AdServices 属性を読み取ります。Capacitor

ガイド

インストールリファラーのチュートリアル

Using @capgo/capacitor-install-referrer

@capgo/capacitor-install-referrer reads install attribution signals in Capacitor apps.

Use it when you need Google Play Install Referrer data on Android and Apple AdServices attribution tokens on iOS through one API.

このプラグインが公開するもの

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

AndroidまたはiOSのインストール Attributionの詳細を返します。

  • getReferrer Android用のPlayリファラー文字列、クリックタイムスタンプ、インストールタイムスタンプ、およびインスタントアプリフラグの互換性のための非推奨の移行用エイリアスです。
  • GetReferrer AndroidはPlayリファラー文字列、クリックタイムスタンプ、インストールタイムスタンプ、およびインスタントアプリフラグを返します。 cap-play-install-referrer.
  • iOSはAdServices Attributionトークンを返し、オプションでAppleのAttribution Payloadを取得できます。
  • __CAPGO_KEEP_1__

例の使用

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のインストールリファラの一般的な代替品を提供していないためです。

フルリファレンス

capgoから続けてください: Using @capgo/capacitor-install-referrer

__CAPGO_KEEP_0__を使用している場合 Using @capgo/capacitor-install-referrer __CAPGO_KEEP_0__を使用してnative pluginの作業を計画する場合、接続する @capgo/capacitor-install-referrer @capgo/capacitor-install-referrerの実装詳細 Getting Started Getting Startedの実装詳細 Capgo プラグインディレクトリ Capgo プラグインディレクトリの製品ワークフロー Capacitor Plugins by Capgo Capacitor プラグインのCapgoによる実装詳細 プラグインの追加または更新 プラグインの追加または更新の実装詳細