시작하기
설치 단계와 이 플러그인에 대한 전체 마크다운 가이드를 포함한 설정 지시를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-appsflyer`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/appsflyer/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치 제목bun add @capgo/capacitor-appsflyerbunx 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 Overview
API 개요initSDK
__CAPGO_KEEP_0__ 초기화SDK을 초기화하고 시작하세요. API은 앱이 시작되면 가능한 한 빨리 호출해야 합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.initSDK({} as AFInit);startSDK
__CAPGO_KEEP_0__ 시작SDK을 시작하세요. 이 메서드는 수동 시작 모드에서만 사용할 수 있습니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.startSDK();logEvent
__CAPGO_KEEP_0__ 이벤트 로깅인앱 이벤트 로깅
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logEvent({} as AFEvent);setCustomerUserId
고객 ID 설정고객 ID를 설정하면 내부 ID와 앱스 플라이어의 고유 ID 및 다른 기기의 ID를 교차 참조할 수 있습니다. 이 ID는 raw-data 보고서 및 Postback API에서 사용할 수 있습니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setCustomerUserId({} as AFCuid);setCurrencyCode
ISO 4217 3자리 통화 코드를 설정합니다.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);updateServerUninstallToken
클립보드 복사OneLink ID를 설정하여 초단어 링크의 속성 정보를 AppsFlyer가 해석할 수 있도록 합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.updateServerUninstallToken({} as AFUninstall);setAppInviteOneLink
OneLink 도메인을 등록하여 AppsFlyer가 짧은 링크 내의 속성 정보를 해석할 수 있도록 합니다.클립보드 복사
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setAppInviteOneLink({} as AFOnelinkID);setOneLinkCustomDomain
클립보드 복사OneLink 도메인을 등록하여 AppsFlyer가 짧은 링크 내의 속성 정보를 해석할 수 있도록 합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setOneLinkCustomDomain({} as AFOnelinkDomain);appendParametersToDeepLinkingURL
appendParametersToDeepLinkingURL 섹션App Links의 OneLink 없이 attribution을 활성화합니다. 이 메서드를 호출하기 전에 startSDK().
최소한 pid 및 is_retargeting=true 인 매개변수 맵에 포함시켜야 합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.appendParametersToDeepLinkingURL({} as AFAppendToDeepLink);setResolveDeepLinkURLs
setResolveDeepLinkURLs 섹션AppsFlyer OneLink이 Universal Link 안에 wrapping되어 있는 경우 사용하세요. 이것은 wrapped URL을 SDK가 resolve할 수 있게 해서 deep linking이 올바르게 작동하도록 합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setResolveDeepLinkURLs({} as AFUrls);addPushNotificationDeepLinkPath
addPushNotificationDeepLinkPath 섹션푸시 알림 패킷에서 deep link 값을 추출하는 방법을 SDK가 어떻게 처리하는지 설정합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.addPushNotificationDeepLinkPath({} as AFPath);setSharingFilter
setSharingFilter지정된 AppsFlyer 파트너에게 이벤트가 전파되는 것을 중지합니다.
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
setAdditionalDataAppsFlyer로 보내는 추가 키-값 데이터를 설정합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setAdditionalData({} as AFData);getAppsFlyerUID
getAppsFlyerUID앱을 설치할 때마다 사용자 기기의 고유한 ID를 AppsFlyer에서 생성합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.getAppsFlyerUID();anonymizeUser
anonymizeUser앱스 플라이어 분석에 대한 사용자 옵트아웃 (사용자 데이터를 익명화합니다.)
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.anonymizeUser({} as AFAnonymizeUser);stop
stop이 API을 호출하면 SDK은 더 이상 서버와 통신하지 않으며 작동을 중단합니다. 사용자 옵인/옵아웃 구현 시 유용합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.stop();disableSKAdNetwork
disableSKAdNetworkSKAdNetwork 옵트아웃
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableSKAdNetwork({} as AFDisable);disableAdvertisingIdentifier
광고 식별자 비활성화이 설정은 SDK에서 수집하는 다양한 광고 ID의 수집을 비활성화합니다. 이에는 Apple Identity for Advertisers (IDFA), Google Advertising ID (GAID), OAID 및 Amazon Advertising ID (AAID)가 포함됩니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableAdvertisingIdentifier({} as AFDisable);disableCollectASA
광고 수집 비활성화애플 검색 광고의 atributions을 거부합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableCollectASA({} as AFDisable);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
validateAndLogInAppPurchaseAndroidAPI을 위한 서버 인증을 위해 in-app 구매를 자동으로 로깅합니다. 유효성 검사가 성공하면 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);getSdkVersion
getSdkVersionSDK 버전을 가져옵니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.getSdkVersion();enableFacebookDeferredApplinks
enableFacebookDeferredApplinksFacebook Deferred AppLinks의 수집을 활성화합니다. Facebook SDK 및 Facebook 앱이 대상/클라이언트 기기에서 설치되어 있어야 합니다. AppsFlyer SDK을 초기화하기 전에 이 API를 호출해야 합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.enableFacebookDeferredApplinks({} as AFFbDAL);sendPushNotificationData
푸시 알림 데이터 전송 섹션푸시 알림 캠페인에서 데이터를 측정하고 가져옵니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.sendPushNotificationData({} as AFPushPayload);setCurrentDeviceLanguage
현재 기기 언어 설정 섹션기기의 언어를 설정합니다. 데이터는 Raw Data Reports에서 표시됩니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setCurrentDeviceLanguage({} as AFLanguage);logCrossPromoteImpression
크로스 프로모션 캠페인에서 인상 로그 섹션크로스 프로모션 캠페인에서 인상을 로그합니다. AppsFlyer 대시보드에서 표시되는 광고 앱 ID를 사용하십시오.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logCrossPromoteImpression({} as AFPromotion);setUserEmails
사용자 이메일 설정 섹션사용자 이메일을 설정하고 암호화합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setUserEmails({} as AFEmails);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);setPartnerData
파트너 데이터 설정__CAPGO_KEEP_0__으로 파트너 통합을 위한 사용자 지정 데이터를 전송할 수 있습니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setPartnerData({} as AFPartnerData);logInvite
사용자 초대 로깅__CAPGO_KEEP_0__으로 사용자 초대 내 앱 이벤트 (af_invite)를 로깅합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logInvite({} as AFLogInvite);setDisableNetworkData
setDisableNetworkData네트워크 제공자 이름 및 SIM 제공자 이름을 수집하기 위해 장치에서 수집하는 것을 피하기 위해 사용합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setDisableNetworkData({} as AFDisable);enableTCFDataCollection
enableTCFDataCollectionCMP를 사용하는 사용자에 대한 자동 동의 데이터 수집을 위해 사용합니다. flag 값은 앱 세션 간에 영구 저장됩니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.enableTCFDataCollection({} as AFEnableTCFDataCollection);setConsentData
setConsentData사용자 동의 데이터를 수동으로 설정합니다. TCF v2.2과 호환되지 않는 CMP를 사용하는 앱의 경우, SDK에 직접 동의 데이터를 제공하는 방법을 사용하여 동의 데이터를 수동으로 제공합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setConsentData({} as AFConsentData);logAdRevenue
logAdRevenue광고 수익을 측정하면 앱 소유자가 사용자 LTV 및 캠페인 ROI를 완벽하게 이해할 수 있습니다. rewarded videos, offer walls, interstitials, banners 등에서 광고를 표시하여 광고 수익을 발생시킵니다. 이 메서드를 사용하여 광고 수익을 로깅할 수 있습니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logAdRevenue({} as AFAdRevenueData);setConsentDataV2
TCF v2.2와 호환되지 않는 CMP를 사용하는 앱의 경우, 사용자 동의 데이터를 직접 __CAPGO_KEEP_0__로 전달하기 위해 다음 방법을 사용하세요.앱스 플라이어 SDK가 현재 세션에서 이미 시작되었는지 확인합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setConsentDataV2({} as AFConsentOptions);Use this method to check whether the AppsFlyer SDK has already been started in the current session.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.isSDKStarted();isSDKStopped
Section titled “isSDKStarted”Use this method to check whether the AppsFlyer SDK is currently stopped.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.isSDKStopped();disableAppSetId
Copy to clipboardDisables 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();validateAndLogInAppPurchaseV2
validateAndLogInAppPurchaseV2API
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.validateAndLogInAppPurchaseV2({} as AFPurchaseDetailsV2);복사하기
실질적인 진실의 근원실질적인 진실의 근원 src/definitions.ts. Re-run the sync when the public API changes upstream.