Getting Started
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함하는 설정 지시를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-install-referrer`
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/install-referrer/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-install-referrerbunx cap syncImport
Import 섹션import { InstallReferrer } from '@capgo/capacitor-install-referrer';Attribution 정보 읽기
Attribution 정보 읽기 섹션const result = await InstallReferrer.getReferrer();
if (result.platform === 'android') { console.log('Install referrer:', result.referrer); console.log('Click timestamp:', result.clickTimestampSeconds); console.log('Install timestamp:', result.installBeginTimestampSeconds);}
if (result.platform === 'ios') { console.log('AdServices token:', result.attributionToken);}iOS에서 Apple Attribution 가져오기
Section titled “Fetch Apple Attribution On iOS”iOS에서 Apple의 attribution endpoint를 호출하기 위해 native code를 사용하고 싶다면 fetchAppleAttribution.
const result = await InstallReferrer.getReferrer({ fetchAppleAttribution: true, appleAttributionRetryCount: 3, appleAttributionRetryDelayMs: 5000,});
// result.appleAttribution is the parsed Apple attribution response.// See the iOS attribution page for the Apple-provided payload fields.console.log(result.appleAttribution);Apple은 유효한 토큰을 위해 attribution 데이터가 준비 중일 때까지 반환할 수 있습니다. 404 retry 옵션은 네이티브 플러그인이 거부하기 전에 얼마나 자주 다시 시도하는지 제어합니다. 자세한 내용은 iOS attribution 을 참조하십시오.
Compatibility Alias
는 앱이GetReferrer() 에서 마이그레이션 중일 때 사용할 수 있습니다. cap-play-install-referrer.
const result = await InstallReferrer.GetReferrer();code의 새로운 버전은 getReferrer().
Getting Started에서 계속하기
를 참조하십시오.Section titled “Keep going from Getting Started” Getting Started native 플러그인 작업을 계획하기 위해 연결하세요. Using @capgo/capacitor-install-referrer native 기능을 사용하는 @capgo/capacitor-install-referrer에 대해 Capgo 플러그인 디렉토리 Capgo 플러그인 디렉토리에서 제품 워크플로우에 대해 Capacitor 플러그인들에 의해 Capgo Capacitor 플러그인들에 의해 Capgo의 구현 세부 사항에 대해 플러그인을 추가하거나 업데이트하는 플러그인을 추가하거나 업데이트하는 구현 세부 사항에 대해 Ionic Enterprise 플러그인 대체 Ionic Enterprise 플러그인 대체의 제품 워크플로우에 대해