내용으로 건너뛰기

Getting Started

GitHub

__CAPGO_KEEP_8__

__CAPGO_KEEP_9__
터미널 창
bun add @capgo/capacitor-install-referrer
bunx cap sync
import { InstallReferrer } from '@capgo/capacitor-install-referrer';
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 가져오기

'iOS에서 Apple Attribution 가져오기' 제목의 섹션

code를 native로 Apple의 attribution endpoint를 호출하고 싶다면 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 while attribution data is still being prepared for a valid token. The retry options control how often the native plugin retries before rejecting. See iOS attribution for platform details.

Compatibility Alias

Compatibility Alias

GetReferrer() is available for apps migrating from cap-play-install-referrer.

const result = await InstallReferrer.GetReferrer();

New code should use getReferrer().

If you are using Getting Started native 플러그인 작업을 계획하기 위해 연결하세요. Using @capgo/capacitor-install-referrer native 기능을 사용하는 @capgo/capacitor-install-referrer에 대해 Capgo 플러그인 디렉토리 Capgo 플러그인 디렉토리에서 제품 워크플로우에 대해 Capacitor 플러그인들에 의해 Capgo Capacitor 플러그인들에 의해 Capgo의 구현 세부 정보에 대해 플러그인을 추가하거나 업데이트 플러그인을 추가하거나 업데이트하는 구현 세부 정보에 대해 Ionic Enterprise 플러그인 대체 Ionic Enterprise 플러그인 대체의 제품 워크플로우에 대해