メインコンテンツにジャンプ
@capgo/capacitor-install-referrer アナリティクス オープンソース

インストール リファラー Capacitor プラグイン

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

インストール

bun add @capgo/capacitor-install-referrer bunx cap sync
npm, pnpm または yarn
  • npm install @capgo/capacitor-install-referrer
  • pnpm add @capgo/capacitor-install-referrer
  • yarn add @capgo/capacitor-install-referrer

Guide

Capacitorを使用する方法

__CAPGO_KEEP_0__アプリをダウンロードし、QRコードをスキャン

Capgo アプリをダウンロードし、QR code をスキャンしてください。

インストールリファラー プラグインのプレビュー QR code

@capgo/capacitor-install-referrerを使用

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

AndroidとApple AdServices Attribution トークンをiOSで使用する必要がある場合、Google Playインストールリファラー データを1つのAPIで取得できます。

インストール

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

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

  • getReferrer AndroidまたはiOSのインストール Attribution の詳細を返します。
  • GetReferrer Android用の古い互換性のための移行用のデプロケーション コンパチビリティ アライアスです。 cap-play-install-referrer.
  • AndroidはPlayリファラー文字列、クリックタイムスタンプ、インストールタイムスタンプ、およびインスタントアプリフラグを返します。
  • iOSはAdServicesのAttribution Tokenを返し、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 Install Referrerサービスを使用し、リアルなリファラー データを取得するためにPlay Storeのインストールが必要です。iOSはApple AdServicesを使用する必要があります。AppleはApp Storeのインストールのための一般的なリファラーの代替品を提供していないためです。

フル リファレンス

capgoの@capacitor-install-referrerを使用している場合

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

FAQ

インストール リファラープラグインのFAQ

インストール リファラープラグインを Capacitor アプリにどのようにインストールするか?

「bun」コマンドを実行してください。 「bun add @capgo/capacitor-install-referrer」(または「npm install @capgo/capacitor-install-referrer」)を実行し、次に「bunx cap sync」を実行してください。 iOSとAndroidのプロジェクトがネイティブ「code」を取得できるようにします。 「@capgo/capacitor-install-referrer」をアプリ「code」からインポートしてください。

「@capgo/capacitor-install-referrer」は、React、Vue、Angularとどのように動作するか?

Yes. Install Referrer is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

Capacitor の Capacitor バージョンは、@capgo/capacitor-install-referrer でどのバージョンをサポートしますか。

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

「@capgo/capacitor-install-referrer」は無料でオープンソースですか?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-install-referrer/ and the package is free to install from npm. Bug reports and pull requests are welcome.

「code」を使用しているアプリをアップデートするにはApp Storeのレビューが必要ですか?

プラグインをインストールまたはアップグレードするとネイティブ「code」が変更されるため、新しいストアビルドが必要になります。 その後、JavaScript、HTML、CSSの変更がプラグインを呼び出す場合、Capgoのライブアップデートで即時実行できます。

アプリレビューの待たずにインストールリファラーの変更を配信する

Once the plugin is in your store build, Capgo live updates push your JavaScript, HTML and CSS changes to users in minutes.

Start with Capgo