@capgo/capacitor-install-referrer 사용
@capgo/capacitor-install-referrer Capacitor 앱에서 설치 인식 신호를 읽습니다.
Android와 Apple AdServices 인앱 구매 신호를 iOS에서 사용할 수 있는 하나의 API에서 Google Play 설치 참조 데이터를 사용하세요.
설치
bun add @capgo/capacitor-install-referrer
bunx cap sync
이 플러그인이 노출하는 것
getReferrerAndroid 또는 iOS에서 설치 인식 세부 정보를 반환합니다.GetReferrerdeprecated compatibility alias로 이전하기 위한 마이그레이션을 위한 compatibility alias입니다.cap-play-install-referrer.- Android에서 Play referrer 문자열, 클릭 시간, 설치 시간 및 즉시 앱 플래그를 반환합니다.
- iOS는 AdServices attribution 토큰을 반환하고 Apple의 attribution 페이로드를 선택적으로 가져올 수 있습니다.
예시 사용
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 페이로드
const result = await InstallReferrer.getReferrer({
fetchAppleAttribution: true,
appleAttributionRetryCount: 3,
appleAttributionRetryDelayMs: 5000,
});
console.log(result.appleAttribution);
플랫폼 설명
안드로이드는 Google Play Install Referrer 서비스를 사용하고 실제 리퍼러 데이터를 얻기 위해 Play Store 설치가 필요합니다. iOS는 Apple AdServices를 사용하는 이유는 Apple이 일반적인 앱 스토어 설치 리퍼러 동등체를 제공하지 않기 때문입니다.
전체 참조
- GitHub: https://github.com/Cap-go/capacitor-installer-referrer/
- 문서: /docs/plugins/install-referrer/
capgo의 @capgo/capacitor-install-referrer를 사용하는 경우 계속 진행하세요.
__CAPGO_KEEP_0__의 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-install-referrer를 사용하는 경우 capgo의 @capgo/capacitor-install-referrer를 사용하는 경우 native 플러그인 작업을 계획하기 위해, 그것을 연결하세요. @capgo/capacitor-install-referrer capgo/capacitor-install-referrer의 implementation detail에 대해 시작하기 Getting Started의 implementation detail에 대해 Capgo 플러그인 디렉토리 Capgo 플러그인 디렉토리의 product workflow에 대해 Capacitor Capgo 플러그인 Capacitor Plugins by Capgo의 implementation detail에 대해, 그리고 플러그인 추가 또는 업데이트 Adding or Updating Plugins의 implementation detail에 대해.