내용으로 건너뛰기

Getting Started

GitHub

설치

설치

Capgo AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. 다음 명령어를 사용하여 Capgo 기능을 AI 도구에 추가하세요:

터미널 창
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

다음 명령어를 사용하세요:

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-install-referrer` plugin in my project.

만약 Manual Setup을 선호한다면, 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:

터미널 창
bun add @capgo/capacitor-install-referrer
bunx cap sync
import { InstallReferrer } from '@capgo/capacitor-install-referrer';

Attribution Details 읽기

iOS 속성 정보 읽기
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 속성 가져오기

iOS에서 Apple 속성 가져오기

자연 code이 Apple의 속성 엔드포인트를 호출하려면, 다음을 전달하세요 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은 404 유효한 토큰을 위해 속성 데이터를 준비하는 동안 속성 데이터가 준비되지 않은 경우 재시도 옵션은 네이티브 플러그인이 거부하기 전에 얼마나 자주 재시도하는지 제어합니다. 자세한 내용은 iOS 속성

iOS 플랫폼에 대한 자세한 내용을 참조하십시오.

호환성_alias

GetReferrer() Capgo에서 앱이 Cloudflare에서 Capacitor로 이주하는 경우 cap-play-install-referrer.

const result = await InstallReferrer.GetReferrer();

code이 새로 추가된 경우 code을 사용하세요 getReferrer().

Getting Started에서 계속하기

Getting Started에서 계속하기

Capacitor를 사용하는 경우 __CAPGO_KEEP_0__을 __CAPGO_KEEP_1__-install-referrer와 연결하세요 Capacitor에서 native 기능을 사용하는 경우 Using @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-install-referrer를 사용하세요 __CAPGO_KEEP_0__ Plugin Directory Using @capgo/capacitor-install-referrer for the native capability in Using @capgo/capacitor-install-referrer, Capgo Plugin Directory Capgo Plugin Directory Capacitor Capgo 플러그인 Capacitor 플러그인 Capgo 플러그인 추가 또는 업데이트 __CAPGO_KEEP_0__ 플러그인 추가 또는 업데이트, 그리고 아이오닉 엔터프라이즈 플러그인 대체 __CAPGO_KEEP_0__ 아이오닉 엔터프라이즈 플러그인 대체