시작하기
설치
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.
설치
설치 제목AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 Capgo 기능을 추가하려면 다음 명령어를 사용하세요:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins다음 명령어를 사용하세요:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-appsflyer` plugin in my project.Manual Setup을 사용하는 경우, 플러그인을 설치하려면 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
bun add @capgo/capacitor-appsflyerbunx cap syncImport
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 개요initSDK
initSDKSDK 초기화 및 시작을 위해 이 메서드를 사용하세요. API은 앱이 시작되면 즉시 호출되어야 합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.initSDK({} as AFInit);startSDK
startSDKSDK을 수동 시작 모드에서만 시작하세요.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.startSDK();logEvent
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’AppsFlyer가 짧은 링크 내에 숨겨진 attribution 매개 변수를 해결할 수 있도록 브랜드된 OneLink 도메인을 등록합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setOneLinkCustomDomain({} as AFOnelinkDomain);appendParametersToDeepLinkingURL
설정 제목 ‘appendParametersToDeepLinkingURL’App Links의 deep 링크에 대한 attribution을 활성화합니다. OneLink가 필요하지 않습니다. 이 메서드를 호출하기 전에 startSDK().
최소한 pid 그리고 is_retargeting=true 인 매개 변수 맵에 포함되어야 합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.appendParametersToDeepLinkingURL({} as AFAppendToDeepLink);setResolveDeepLinkURLs
설정 제목 ‘setResolveDeepLinkURLs’AppsFlyer OneLink가 다른 Universal Link 안에 wrapping되어 있을 때 사용하세요. 이것은 SDK가 wrapping된 URL을 해결하여 deep linking이 올바르게 작동하도록 해줍니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setResolveDeepLinkURLs({} as AFUrls);addPushNotificationDeepLinkPath
푸시 알림 깊이 경로 추가Configures how the SDK extracts deep link values from push notification payloads.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.addPushNotificationDeepLinkPath({} as AFPath);setSharingFilter
파트너 설정지정된 앱스 플라이어 파트너로 이벤트가 전파되는 것을 막습니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setSharingFilter({} as AFFilters);setSharingFilterForAllPartners
모든 앱스 플라이어 파트너로 이벤트가 전파되는 것을 막습니다. 파트너 설정을 덮어씁니다.클립보드 복사
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setSharingFilterForAllPartners();setSharingFilterForPartners
지정된 앱스 플라이어 파트너로 이벤트가 전파되는 것을 막습니다.클립보드 복사
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setSharingFilterForPartners({} as AFFilters);setAdditionalData
Section titled “setAdditionalData”AppsFlyer에 추가 데이터를 전송하기 위해 키-값 데이터를 설정합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setAdditionalData({} as AFData);getAppsFlyerUID
Section titled “getAppsFlyerUID”앱 설치 시 AppsFlyer에서 생성되는 고유 장치 ID를 가져옵니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.getAppsFlyerUID();anonymizeUser
Section titled “anonymizeUser”AppsFlyer 분석에서 사용자 데이터를 익명화합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.anonymizeUser({} as AFAnonymizeUser);Once this API is invoked, our SDK no longer communicates with our servers and stops functioning. Useful when implementing user opt-in/opt-out.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.stop();disableSKAdNetwork
SKAdNetwork 비활성화SKAdNetwork 비활성화
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableSKAdNetwork({} as AFDisable);disableAdvertisingIdentifier
광고 식별자 비활성화이 SDK에서 광고 식별자 수집을 비활성화합니다. 이에는 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
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
validateAndLogInAppPurchaseAndroidAPI을 사용하여 앱 내 구매를 서버에서 검증합니다. 검증이 성공하면 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
Facebook Deferred AppLinks 활성화Facebook Deferred AppLinks를 수집하기 위해 Facebook SDK와 대상 기기에서 Facebook 앱이 필요합니다. 이 API은 AppsFlyer 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
복사크로스 프로모션 캠페인에서 인상 로그합니다. AppsFlyer 대시보드에서 표시되는 광고 앱 ID를 사용하세요.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setCurrentDeviceLanguage({} as AFLanguage);logCrossPromoteImpression
푸시 알림 캠페인 데이터를 측정하고 가져오기푸시 알림 캠페인 데이터를 측정하고 가져오기
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
전화번호 설정SHA-256 암호화된 문자열로 전송됩니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setPhoneNumber({} as AFPhone);setPartnerData
파트너 데이터 설정파트너 통합을 위한 사용자 지정 데이터를 전송할 수 있습니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setPartnerData({} as AFPartnerData);logInvite
Section titled “logInvite”사용자 초대 내 앱 이벤트 (af_invite)를 로깅하기 위해 사용합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logInvite({} as AFLogInvite);setDisableNetworkData
Section titled “setDisableNetworkData”네트워크 제공자 이름 (carrier)과 SIM 제공자 이름을 장치에서 수집하는 것을 중단하기 위해 사용합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setDisableNetworkData({} as AFDisable);enableTCFDataCollection
Section titled “enableTCFDataCollection”TCF v2.2와 호환되는 CMP를 사용하는 사용자에 대한 자동 동의 데이터 수집을 켜거나 끕니다. 플래그 값은 앱 세션 간에 유지됩니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.enableTCFDataCollection({} as AFEnableTCFDataCollection);setConsentData
Section titled “setConsentData”사용자 동의 데이터를 수동으로 설정합니다. TCF v2.2와 호환되지 않는 CMP를 사용하는 앱의 경우, 사용자 동의 데이터를 직접 SDK에 제공하는 방법을 사용합니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.setConsentData({} as AFConsentData);logAdRevenue
‘광고 수익 로그’ 섹션광고 수익을 연결하면 앱 소유자는 사용자 LTV 및 캠페인 ROI에 대한 완전한 시각을 얻을 수 있습니다. 광고 수익은 rewarded 비디오, offer walls, interstitials 및 배너를 포함한 앱 내에서 광고를 표시함으로써 발생합니다. 이 메서드를 사용하여 광고 수익을 로깅할 수 있습니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.logAdRevenue({} as AFAdRevenueData);setConsentDataV2
‘consent 데이터 설정 v2’ 섹션이 메서드를 사용하여 사용자 동의 데이터를 수동으로 설정합니다. 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
disableAppSetIdAppSet ID 수집을 비활성화합니다. SDK 초기화 전에 호출된 경우 App Set ID가 수집되지 않습니다. 초기화 후에 호출된 경우 App Set ID가 수집되지만 요청 패킷에 전송되지 않습니다. Android 전용.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.disableAppSetId();validateAndLogInAppPurchaseV2
validateAndLogInAppPurchaseV2API를 사용하여 앱 내 구매 V2의 서버 검증을 위한 것입니다. 검증이 성공적으로 완료되면 af_purchase 이벤트와 관련된 값이 자동으로 로그됩니다.
import { AppsFlyer } from '@capgo/capacitor-appsflyer';
await AppsFlyer.validateAndLogInAppPurchaseV2({} as AFPurchaseDetailsV2);실질적인 출처
이 페이지는 플러그인의public __CAPGO_KEEP_0__이 업스트림에서 변경될 때 다시 싱크를 실행하세요. src/definitions.ts. Re-run the sync when the public API changes upstream.
이 기능을 사용 중이라면 Getting Started 계획 대시보드 및 API 연산을 계획하고 싶다면 Using @capgo/capacitor-appsflyer Using @capgo/capacitor-appsflyer API 개요 API 개요 소개 소개 API 키 API 키 장치 장치에 대한 구현 세부 정보.