コンテンツにスキップ

Getting Started

GitHub
ターミナル画面
bun add @capgo/capacitor-appsflyer
bunx cap sync
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
import type {
AFAdRevenueData,
AFAndroidInAppPurchase,
AFAnonymizeUser,
AFAppendToDeepLink,
AFConsentData,
AFConsentOptions,
AFCuid,
AFCurrency,
AFData,
AFDisable,
AFEmails,
AFEnableTCFDataCollection,
AFEvent,
AFFbDAL,
AFFilters,
AFHost,
AFInit,
AFIosInAppPurchase,
AFLanguage,
AFLatLng,
AFLinkGenerator,
AFLogInvite,
AFOnelinkDomain,
AFOnelinkID,
AFPartnerData,
AFPath,
AFPhone,
AFPromotion,
AFPurchaseDetailsV2,
AFPushPayload,
AFUninstall,
AFUrls,
} from '@capgo/capacitor-appsflyer';

APIの概要

APIの概要

Use this method to initialize and start AppsFlyer SDK. This API should be called as soon as the app launches.

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.initSDK({} as AFInit);

startSDK

startSDK

Use this method to start AppsFlyer SDK, only on manual start mode.

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.startSDK();

logEvent

logEvent

インアプリイベントをログします。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logEvent({} as AFEvent);

setCustomerUserId

setCustomerUserId

自分の顧客IDを設定すると、AppsFlyerのユニークIDと他のデバイスのIDをクロス参照できます。 このIDは、rawデータレポートとPostback APIで利用できます。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setCustomerUserId({} as AFCuid);

setCurrencyCode

setCurrencyCode

Sets the currency used for in-app purchases. Provide a three-character ISO 4217 code.

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setCurrencyCode({} as AFCurrency);

Android では GCM/FCM トークン、iOS では APNs トークンを使用して、他のプラグインが収集したトークンをパスします。 AppsFlyer にアンインストール測定トークンを転送するには、このメソッドを使用します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.updateServerUninstallToken({} as AFUninstall);

インビテーション Attribution のために使用される OneLink ID を設定します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setAppInviteOneLink({} as AFOnelinkID);

OneLink ドメインを登録して、AppsFlyer が短リンクに隠された Attribution パラメータを解決できるようにします。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setOneLinkCustomDomain({} as AFOnelinkDomain);

OneLink がない App Links のデープリンクの Attribution を有効にするには、このメソッドを呼び出してください。 少なくとも startSDK()コピー pid とパラメータマップに。 is_retargeting=true コピー

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.appendParametersToDeepLinkingURL({} as AFAppendToDeepLink);

Use this when an AppsFlyer OneLink is wrapped inside another Universal Link. It lets the SDK resolve the wrapped URL so deep linking still works correctly.

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setResolveDeepLinkURLs({} as AFUrls);

Configures how the SDK extracts deep link values from push notification payloads.

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.addPushNotificationDeepLinkPath({} as AFPath);

コピー

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setSharingFilter({} as AFFilters);

setSharingFilterForAllPartners

setSharingFilterForAllPartners

すべてのパートナーへのイベントの伝播を停止します。setSharingFilterを上書きします。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setSharingFilterForAllPartners();

setSharingFilterForPartners

setSharingFilterForPartners

指定されたAppsFlyerパートナーへのイベントの伝播を停止します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setSharingFilterForPartners({} as AFFilters);

setAdditionalData

setAdditionalData

AppsFlyerに追加のkey-valueデータを送信します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setAdditionalData({} as AFData);

getAppsFlyerUID

setAdditionalData

AppsFlyerのユニークデバイスIDを取得します (アプリの新しいインストールごとに作成されます)。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.getAppsFlyerUID();

アプリフライヤー アナリティクスからエンドユーザーがオプトアウトする (ユーザーデータの匿名化)

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.anonymizeUser({} as AFAnonymizeUser);

API が呼び出された後、SDK はサーバーと通信できなくなり、機能を停止します。 ユーザーがオプトイン/オプトアウトを実装する際に便利

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.stop();

SKAdNetwork からオプトアウト

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableSKAdNetwork({} as AFDisable);

SDK が広告識別子 (IDFA、GAID、OAID、AAID) の収集を無効化します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableAdvertisingIdentifier({} as AFDisable);

Apple Search AdsのAttributionをオプトアウトします。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableCollectASA({} as AFDisable);

カスタムホストを設定します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setHost({} as AFHost);

既存のユーザーが友達や連絡先を新しいユーザーとしてアプリに招待できるようにします。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.generateInviteLink({} as AFLinkGenerator);

APIはアプリ内購入のサーバー検証用です。アプリ内購入の検証が成功すると、関連する値を含むaf_purchaseイベントが自動的にログされます。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.validateAndLogInAppPurchaseAndroid({} as AFAndroidInAppPurchase);

現在の契約のソース定義を参照してください。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.validateAndLogInAppPurchaseIos({} as AFIosInAppPurchase);

アプリに使用されているAppsFlyer SDKのバージョンを取得します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.getSdkVersion();

Facebook Deferred AppLinksの収集を有効にします。Facebook SDKとFacebookアプリがターゲット/クライアントデバイスにインストールされている必要があります。 このAPIは、AppsFlyer SDKを初期化する前に呼び出す必要があります。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.enableFacebookDeferredApplinks({} as AFFbDAL);

プッシュ通知キャンペーンのデータを取得します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.sendPushNotificationData({} as AFPushPayload);

setCurrentDeviceLanguage

setCurrentDeviceLanguage

デバイスの言語を設定します。データはRaw Data Reportsで表示されます。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setCurrentDeviceLanguage({} as AFLanguage);

logCrossPromoteImpression

logCrossPromoteImpression

クロスプロモーションキャンペーンの一部としてインプレッションをログします。AppsFlyer ダッシュボードで表示されるプロモートアプリIDを使用してください。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logCrossPromoteImpression({} as AFPromotion);

setUserEmails

setUserEmails

ユーザーのメールアドレスを設定して暗号化します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setUserEmails({} as AFEmails);

logLocation

logLocation

ユーザーの位置を手動でログします。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logLocation({} as AFLatLng);

setPhoneNumber

電話番号を設定

__CAPGO_KEEP_0__

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setPhoneNumber({} as AFPhone);

__CAPGO_KEEP_0__

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setPartnerData({} as AFPartnerData);

__CAPGO_KEEP_0__

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logInvite({} as AFLogInvite);

__CAPGO_KEEP_0__

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setDisableNetworkData({} as AFDisable);

CMPを使用するユーザー向けに、自動的な同意データの収集を有効/無効にするために使用します。 アプリセッション間でフラグ値が保存されます。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.enableTCFDataCollection({} as AFEnableTCFDataCollection);

CMPと互換性のないアプリでは、直接SDKに同意データを提供するために使用します。 ユーザーの同意データを手動で設定します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setConsentData({} as AFConsentData);

広告収益を特定することで、アプリ所有者はユーザーのLTVとキャンペーンROIを完全に把握できます。 リワードビデオ、オファーワール、インスタンス広告、バナー広告を表示することで、広告収益が生成されます。 このメソッドを使用して広告収益を記録します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logAdRevenue({} as AFAdRevenueData);

CMPと互換性のないアプリでは、直接SDKに同意データを提供するために使用します。 ユーザーの同意データを手動で設定します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setConsentDataV2({} as AFConsentOptions);

このメソッドを使用して、現在のセッションでAppsFlyer SDK がすでに開始されているかどうかを確認します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.isSDKStarted();

このメソッドを使用して、AppsFlyer SDK が現在停止されているかどうかを確認します。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.isSDKStopped();

AppSet ID の収集を無効にします。SDK の初期化前に呼び出された場合、App Set ID は収集されません。初期化後に呼び出された場合、App Set ID は収集されますが、リクエスト パayload に送信されません。Android 限定。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableAppSetId();

API のサーバー検証用のインアプリ購入 V2 です。 検証が成功した場合、関連する値を含む af_purchase イベントが自動的にログされます。

import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.validateAndLogInAppPurchaseV2({} as AFPurchaseDetailsV2);

このページはプラグインの src/definitions.ts. 公開 API がアップストリームで変更された場合に、再度 Sync を実行してください。

Capacitor を使用している場合 Getting Started ダッシュボードと API の作業を計画するには、Capacitor を使用して Capacitor の @capgo/capacitor-appsflyer を使用 Capacitor の @capgo/capacitor-appsflyer のネイティブ機能 API の概要 実装詳細については API の概要を参照してください。 概要 実装詳細については Introduction を参照してください。 API のキー 実装詳細については API Keys を参照してください。 デバイス 実装詳細については Devices を参照してください。