@capgo/capacitor-install-referrer를 사용하여
@capgo/capacitor-install-referrer Capacitor 앱에서 설치 신호를 읽습니다.
API을 사용하여 Android에서 Google Play 설치 참조자 데이터 및 iOS에서 Apple AdServices Attribution 토큰을 하나의 API에서 필요할 때.
설치
bun add @capgo/capacitor-install-referrer
bunx cap sync
이 플러그인은 무엇을 제공합니까?
getReferrerAndroid 또는 iOS에서 설치 신호를 반환합니다.GetReferrer__CAPGO_KEEP_0__은 Android 또는 iOS에서 설치 신호를 반환하는 데 사용됩니다. (이 기능은 deprecated 상태입니다.)cap-play-install-referrer.- 안드로이드는 Play referrer string, click timestamp, install timestamp, 및 instant app flag을 반환합니다.
- iOS는 AdServices attribution token을 반환하고 Apple의 attribution payload를 선택적으로 가져올 수 있습니다.
예시 사용
import { InstallReferrer } from '@capgo/capacitor-install-referrer';
const result = await InstallReferrer.getReferrer();
if (result.platform === 'android') {
console.log(result.referrer);
}
if (result.platform === 'ios') {
console.log(result.attributionToken);
}
애플 Attribution Payload
const result = await InstallReferrer.getReferrer({
fetchAppleAttribution: true,
appleAttributionRetryCount: 3,
appleAttributionRetryDelayMs: 5000,
});
console.log(result.appleAttribution);
플랫폼 설명
안드로이드는 Google Play Install Referrer 서비스를 사용하고 실제 referrer 데이터를 얻기 위해 Play Store 설치가 필요합니다. iOS는 Apple AdServices를 사용합니다. Apple은 App Store 설치 referrer의 일반적인 대안을 제공하지 않기 때문입니다.
전체 참조
- GitHub: https://github.com/Cap-go/capacitor-install-referrer/
- 문서: /docs/plugins/install-referrer/
Keep going from Using @capgo/capacitor-install-referrer
__CAPGO_KEEP_0__를 사용 중이라면 @capgo/capacitor-install-referrer native 플러그인 작업을 계획하기 위해 연결하는 @capgo/capacitor-install-referrer @capgo/capacitor-install-referrer Getting Started Getting Started의 구현 세부 정보를 위해 Capgo 플러그인 디렉토리 Capgo 플러그인 디렉토리의 제품 워크플로에 대해 Capacitor Plugins by Capgo Capacitor Plugins by Capgo의 구현 세부 정보를 위해 Adding or Updating Plugins Adding or Updating Plugins의 구현 세부 정보를 위해