컨텐츠로 바로가기

시작하기

설치

설치
터미널 창
bun add @capgo/capacitor-appsflyer
bunx cap sync

import

import
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 개요

이 메서드를 사용하여 앱스 플라이어 SDK를 초기화하고 시작합니다. 이 API는 앱이 시작되면 즉시 호출되어야 합니다.

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

startSDK

시작 SDK

수동 시작 모드에서만 앱스 플라이어 SDK을 시작하는 방법입니다.

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

인앱 이벤트를 로그합니다.

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

setCustomerUserId

고객 ID 설정

고객 ID를 설정하면 앱스 플라이어의 고유 ID와 다른 기기의 ID를 교차 참조할 수 있습니다. 이 ID는 원시 데이터 보고서와 Postback API에서 교차 참조할 수 있는 내부 ID와 함께 사용할 수 있습니다.

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

setCurrencyCode

통화 코드 설정

인앱 구매에 사용할 통화를 설정합니다. 3자리 ISO 4217 code을 제공하세요.

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

updateServerUninstallToken

업데이트 서버 해제 토큰

안드로이드에서 GCM/FCM 토큰 또는 iOS에서 APNs 토큰을 다른 플러그인에서 수집했을 때 전달합니다. 앱스 플라이어로 해제 측정 토큰을 전달하기 위해 사용합니다.

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

초대 인정을 위한 OneLink ID를 사용합니다.

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

클립보드에 복사

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

appendParametersToDeepLinkingURL

적어도

클립보드에 복사 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

모든 AppsFlyer 파트너에게 이벤트가 전파되는 것을 막습니다. 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로 추가 키-값 데이터를 전송합니다.

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

getAppsFlyerUID

getAppsFlyerUID

AppsFlyer의 고유 장치 ID를 가져옵니다 (앱의 새로운 설치마다 생성됩니다).

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

anonymizeUser

__CAPGO_KEEP_0__

End User Opt-Out from AppsFlyer analytics (사용자 데이터를 익명화합니다.)

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

API가 호출되면 SDK은 더 이상 서버와 통신하지 않으며 작동을 중단합니다. 사용자 옵인/옵아웃 구현 시 유용합니다.

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

disableSKAdNetwork

__CAPGO_KEEP_0__

Opt-out of SKAdNetwork

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

disableAdvertisingIdentifier

__CAPGO_KEEP_0__

Disables collection of various Advertising IDs by the SDK. This includes Apple Identity for Advertisers (IDFA), Google Advertising ID (GAID), OAID and Amazon Advertising ID (AAID).

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

disableCollectASA

disableCollectASA

Apple 검색 광고의 기여를 거부합니다.

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

setHost

setHost

사용자 지정 호스트 설정

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

기존 사용자들이 친구 및 연락처를 새로운 사용자로 초대할 수 있도록 합니다.

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

validateAndLogInAppPurchaseAndroid

validateAndLogInAppPurchaseAndroid

API : 앱 내 구매를 서버에서 확인합니다. 구매가 성공적으로 검증되면 af_purchase 이벤트와 관련된 값이 자동으로 로그됩니다.

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

validateAndLogInAppPurchaseIos

validateAndLogInAppPurchaseIos 섹션

현재 계약의 소스 정의를 참조하세요.

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

앱스 플라이어 SDK 버전을 앱에 사용하는 버전을 가져옵니다.

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

Facebook Deferred AppLinks의 데이터 수집을 활성화합니다. Facebook SDK와 Facebook 앱이 대상/클라이언트 기기에 설치되어 있어야 합니다. AppsFlyer SDK를 초기화하기 전에 이 API를 호출해야 합니다.

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

sendPushNotificationData

sendPushNotificationData 섹션

푸시 알림 캠페인에서 데이터를 측정하고 가져옵니다.

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

크로스 프로모션 캠페인에서 사용되는 광고 앱 ID를 AppsFlyer 대시보드에서 확인하여 impression을 로깅하세요.

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

전화번호 설정

SHA-256 암호화된 문자열로 전송됩니다.

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

파트너 통합을 위한 사용자 지정 데이터를 전송할 수 있습니다.

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

사용자 인바이팅 내 앱 이벤트 (af_invite)를 로그합니다.

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

장치에서 네트워크 제공자 이름 (캐리어)과 SIM 제공자 이름을 수집하지 않도록 옵트아웃합니다.

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

TCF 데이터 수집을 자동으로 수집하거나 비활성화하는 데 사용합니다. 사용자가 CMP를 사용하는 경우 flag 값은 앱 세션 간에 유지됩니다.

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

TCF v2.2과 호환되지 않는 CMP를 사용하는 앱이 아닌 경우, 사용자 consent 데이터를 직접 SDK에 제공하는 데 사용합니다.

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

광고 수익을 기록함으로써 앱 소유자는 사용자 LTV 및 캠페인 ROI에 대한 완전한 시각을 얻을 수 있습니다. 광고는 rewarded 비디오, offer walls, interstitials, 및 배너를 통해 앱에서 생성됩니다. 이 메서드를 사용하여 광고 수익을 기록할 수 있습니다.

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

TCF v2.2과 호환되지 않는 CMP를 사용하는 앱이 아닌 경우, 사용자 consent 데이터를 직접 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();

Disables AppSet ID collection. If called before SDK init, App Set ID will not be collected. If called after init, App Set ID will be collected but not sent in request payloads. Android only.

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

API for server verification of in-app purchases V2. An af_purchase event with the relevant values will be automatically logged if the validation is successful.

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

__CAPGO_KEEP_0__

__CAPGO_KEEP_1__

이 페이지는 플러그인의 src/definitions.tsAPI가 업스트림에서 변경될 때 다시 싱크를 실행하세요.