내용으로 건너뛰기

시작하기

GitHub

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

터미널 창
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를 읽기

Attribution Details 섹션
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 애플리케이션에서 Attribution을 가져오기

iOS 애플 Attribution 가져오기

native code가 애플의 Attribution 엔드포인트를 호출하고 싶다면, 유효한 토큰을 위해 Attribution 데이터가 준비되는 동안 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);

애플이 반환할 수 있는 404 애플이 반환할 수 있는 Attribution 데이터가 유효한 토큰을 위해 준비되는 동안 native plugin이 다시 시도하기 전에 거부하기 전에 native plugin이 다시 시도하는 횟수를 제어합니다. See iOS attribution

iOS 애플리케이션에서 Attribution을 가져오기

Compatibility Alias

GetReferrer() Section titled “Compatibility Alias” cap-play-install-referrer.

const result = await InstallReferrer.GetReferrer();

새로운 code 사용자 getReferrer().

Getting Started에서 계속

Getting Started에서 계속하기

__CAPGO_KEEP_0__을 사용 중이라면 Getting Started native plugin 작업을 계획하려면 연결하세요 @capgo/capacitor-install-referrer Using @capgo/capacitor-install-referrer에서 네이티브 기능을 사용하기 위해 Capgo 플러그인 디렉토리 Capgo Plugin Directory에서 제품 워크플로우를 사용하기 위해 Capacitor Capgo의 플러그인으로 Capgo Capacitor Plugins by Capgo에서 구현 세부 정보를 사용하기 위해 플러그인 추가 또는 업데이트 플러그인 추가 또는 업데이트 구현 세부 사항에 대해 아이오닉 엔터프라이즈 플러그인 대체 아이오닉 엔터프라이즈 플러그인 제품 워크플로에 대해