Skip to content

시작하기

터미널 창
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 Overview

API 개요

SDK을 초기화하고 시작하세요. API은 앱이 시작되면 가능한 한 빨리 호출해야 합니다.

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

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를 교차 참조할 수 있습니다. 이 ID는 raw-data 보고서 및 Postback API에서 사용할 수 있습니다.

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

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);

클립보드 복사

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(). 최소한 pidis_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

setAdditionalData

AppsFlyer로 보내는 추가 키-값 데이터를 설정합니다.

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

disableSKAdNetwork

SKAdNetwork 옵트아웃

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);

애플 검색 광고의 atributions을 거부합니다.

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);

validateAndLogInAppPurchaseAndroid

validateAndLogInAppPurchaseAndroid

API을 위한 서버 인증을 위해 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

getSdkVersion

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);

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

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);

크로스 프로모션 캠페인에서 인상을 로그합니다. AppsFlyer 대시보드에서 표시되는 광고 앱 ID를 사용하십시오.

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

사용자 이메일을 설정하고 암호화합니다.

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

사용자의 위치를 수동으로 로깅합니다.

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__으로 사용자 초대 내 앱 이벤트 (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

enableTCFDataCollection

CMP를 사용하는 사용자에 대한 자동 동의 데이터 수집을 위해 사용합니다. 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);

앱스 플라이어 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();

Use this method to check whether the AppsFlyer SDK is currently stopped.

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

disableAppSetId

Copy to clipboard

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();

validateAndLogInAppPurchaseV2

validateAndLogInAppPurchaseV2

API

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

실질적인 진실의 근원 src/definitions.ts. Re-run the sync when the public API changes upstream.