시작하기
설치 명령어와 전체 마크다운 가이드를 포함한 플러그인 설정 프롬프트 복사
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 syncimport
Section titled “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 개요
Section titled “API 개요”initSDK
Section titled “initSDK”SDK을 초기화하고 시작하기 위해 이 메소드를 사용하세요. API은 앱이 시작되면 가능한 한 빨리 호출되어야 합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.initSDK({} as AFInit);startSDK
Section titled “startSDK”AppsFlyer SDK을 시작하기 위해 이 메소드를 사용하세요. 수동 시작 모드에서만 사용하세요.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.startSDK();logEvent
Section titled “logEvent”인앱 이벤트를 로그합니다.
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
통화 코드를 설정하는 섹션인앱 구매에 사용하는 통화 코드를 설정합니다. 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);setAppInviteOneLink
인바이트 원 링크를 설정하는 섹션인바이트 속성에 사용하는 원 링크 ID를 설정합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setAppInviteOneLink({} as AFOnelinkID);setOneLinkCustomDomain
setOneLinkCustomDomain브랜드된 OneLink 도메인을 등록하여 앱스 플라이어가 짧은 링크 내에 숨겨진 Attribution 매개 변수를 해결할 수 있도록합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setOneLinkCustomDomain({} as AFOnelinkDomain);appendParametersToDeepLinkingURL
appendParametersToDeepLinkingURLApp Links의 deep 링크에 Attribution을 활성화하려면 OneLink이 필요하지 않습니다. 이 메서드를 호출하기 전에 startSDK()복사 pid setResolveDeepLinkURLs is_retargeting=true 이 메서드를 사용하여 앱스 플라이어 OneLink가 다른 Universal Link 안에 wrap되어 있는 경우에 __CAPGO_KEEP_0__가 wrap된 URL을 해결하여 deep linking이 올바르게 작동하도록합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.appendParametersToDeepLinkingURL({} as AFAppendToDeepLink);setResolveDeepLinkURLs
andUse 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);addPushNotificationDeepLinkPath
addPushNotificationDeepLinkPath 제목push 알림의 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
‘setAdditionalData’ 섹션앱스 플라이어로 전송할 추가 키-값 데이터를 설정합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setAdditionalData({} as AFData);getAppsFlyerUID
‘getAppsFlyerUID’ 섹션앱스 플라이어의 고유 장치 ID (앱을 설치할 때마다 생성됨)를 가져옵니다.
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
SKAdNetwork 비활성화SKAdNetwork을 비활성화
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableSKAdNetwork({} as AFDisable);disableAdvertisingIdentifier
광고 식별자 비활성화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
Apple Search Ads Attribution 비활성화Apple Search Ads Attribution을 비활성화
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableCollectASA({} as AFDisable);setHost
호스트 설정호스트를 사용자 정의합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setHost({} as AFHost);generateInviteLink
“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);getSdkVersion
“getSdkVersion” 섹션AppsFlyer SDK 버전을 앱에서 사용하는 것을 가져옵니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.getSdkVersion();enableFacebookDeferredApplinks
enableFacebookDeferredApplinks페이스북 deferred 앱 링크의 수집을 활성화하세요. 페이스북 SDK 및 페이스북 앱이 대상/클라이언트 기기에서 설치되어 있어야 합니다.\n이 API는 앱스플라이어 SDK를 초기화하기 전에 호출되어야 정상적으로 작동합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.enableFacebookDeferredApplinks({} as AFFbDAL);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
로그 크로스 프로모션 인상크로스 프로모션 캠페인에서 인상 로그를 기록합니다. 프로모션된 앱 ID를 사용하기 위해 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
setPhoneNumber 섹션SHA-256 암호화된 문자열로 전송됩니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setPhoneNumber({} as AFPhone);setPartnerData
setPartnerData 섹션파트너 통합을 위한 사용자 정의 데이터를 보내는 데 사용됩니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setPartnerData({} as AFPartnerData);logInvite
로그인 초대 이벤트 로깅사용자 초대 이벤트를 로깅합니다 (af_invite).
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logInvite({} as AFLogInvite);setDisableNetworkData
네트워크 데이터 수집 거부네트워크 제공자 이름 (carrier)과 SIM 제공자 이름을 장치에서 수집하지 않습니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setDisableNetworkData({} as AFDisable);enableTCFDataCollection
TCF 데이터 수집 활성화TCF v2.2과 호환되는 CMP를 사용하는 사용자에 대한 자동 데이터 수집을 활성화/비활성화합니다. 플래그 값은 앱 세션 간에 유지됩니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.enableTCFDataCollection({} as AFEnableTCFDataCollection);setConsentData
사용자 동의 데이터 설정사용자 동의 데이터를 수동으로 설정합니다. TCF v2.2과 호환되지 않는 CMP를 사용하는 앱의 경우, SDK에 직접 동의 데이터를 제공하는 방법을 사용하세요.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setConsentData({} as AFConsentData);logAdRevenue
로그 광고 수익광고 수익을 기여함으로써 앱 소유자는 사용자 LTV 및 캠페인 ROI에 대한 완전한 시각을 얻을 수 있습니다. 광고 수익은 보상 비디오, 광고 벽, 인터 스테일, 배너 등 앱 내에서 광고를 표시함으로써 발생합니다. 이 방법을 사용하여 광고 수익을 로깅할 수 있습니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logAdRevenue({} as AFAdRevenueData);setConsentDataV2
설정된 동의 데이터이 방법을 사용하여 사용자 동의 데이터를 수동으로 설정합니다. TCF v2.2와 호환되지 않는 CMP를 사용하는 앱이면, SDK에 직접 동의 데이터를 제공하기 위해 다음 방법을 사용합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setConsentDataV2({} as AFConsentOptions);isSDKStarted
SDK가 시작되었는지 확인이 방법을 사용하여 현재 세션에서 AppsFlyer SDK가 이미 시작되었는지 확인합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.isSDKStarted();isSDKStopped
SDK가 중지되었는지 확인이 방법을 사용하여 현재 AppsFlyer SDK가 중지되었는지 확인합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.isSDKStopped();disableAppSetId
disableAppSetId앱 세트 ID 수집을 비활성화합니다. SDK 초기화 전에 호출된 경우 앱 세트 ID가 수집되지 않습니다. 초기화 후에 호출된 경우 앱 세트 ID가 수집되지만 요청 패킷에 전송되지 않습니다. 안드로이드 전용.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableAppSetId();validateAndLogInAppPurchaseV2
validateAndLogInAppPurchaseV2API를 사용하여 서버에서 앱 내 구매를 검증합니다. 검증이 성공한 경우 관련 값이 포함된 af_purchase 이벤트가 자동으로 로그됩니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.validateAndLogInAppPurchaseV2({} as AFPurchaseDetailsV2);Source Of Truth
이 페이지는 플러그인의public __CAPGO_KEEP_0__이 업스트림에서 변경될 때 다시 싱크를 실행하세요. src/definitions.ts. Re-run the sync when the public API changes upstream.