시작하기
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 지시를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-rudderstack`
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/rudderstack/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-rudderstackbunx cap syncimport
import 제목import { nativePlugin } from '@capgo/capacitor-rudderstack';initialize
초기화__CAPGO_KEEP_0__을 초기화합니다.
__CAPGO_KEEP_1__은 Cordova 서명이 유지되므로 두 번째 인자는 config 객체 또는 Rudder 옵션 객체 둘 중 하나여야 합니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.initialize('value');identify
__CAPGO_KEEP_3____CAPGO_KEEP_4__을 위한 사용자 ID로 제공된 identify 호출을 보냅니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.identify('value');group
__CAPGO_KEEP_3____CAPGO_KEEP_4__을 위한 그룹 ID로 제공된 group 호출을 보냅니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.group('value');track
__CAPGO_KEEP_3____CAPGO_KEEP_4__을 위한 이벤트 이름으로 제공된 track 호출을 보냅니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.track('value');screen
스크린 섹션스크린 이름을 제공하는 경우 스크린 콜을 보냅니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.screen('value');alias
별칭 섹션현재 사용자를 새로운 식별자로 별칭합니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.alias('value');reset
리셋 섹션현재 RudderStack 식별자 상태를 리셋합니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.reset();flush
플러시 섹션임의로 큐드 이벤트를 즉시 플러시합니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.flush();putDeviceToken
putDeviceToken 섹션RudderStack이 지원하는 목적지로 전달하는 푸시 토큰을 설정합니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.putDeviceToken('value');setAdvertisingId
setAdvertisingId 섹션현재 계약의 소스 정의를 참조하세요.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.setAdvertisingId('value');putAdvertisingId
putAdvertisingId 섹션사용자 지정 광고 ID 값을 설정합니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.putAdvertisingId('value');setAnonymousId
setAnonymousId 섹션현재 계약의 소스 정의를 참조하세요.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.setAnonymousId('value');putAnonymousId
“익명 ID”를 설정합니다.사용자 고유의 익명 ID 값을 설정합니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.putAnonymousId('value');optOut
“트래킹 차단”을 설정합니다.트래킹 차단을 설정/해제합니다.
import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.optOut(true);타입 참조
“타입 참조”RudderConfiguration
“루더 구성”루더 스택 내장 네이티브 SDK의 지원 구성 키입니다.
export interface RudderConfiguration { /** * RudderStack data plane URL. */ dataPlaneUrl?: string;
/** * Number of events to batch before a flush. */ flushQueueSize?: number;
/** * Database row threshold that triggers pruning on Android and iOS. */ dbCountThreshold?: number;
/** * Server config refresh interval in hours. */ configRefreshInterval?: number;
/** * RudderStack log verbosity. */ logLevel?: RudderLogLevelValue;
/** * Sleep timeout / sleep count used by the native SDK. */ sleepTimeOut?: number;
/** * Android only. Lets the native SDK collect the advertising identifier automatically. */ autoCollectAdvertId?: boolean;
/** * Tracks `Application Installed`, `Application Updated`, and `Application Opened` automatically. */ trackLifecycleEvents?: boolean;
/** * RudderStack control plane URL. */ controlPlaneUrl?: string;
/** * Enables automatic screen tracking where supported by the native SDK. */ recordScreenViews?: boolean;
/** * Ignored in this Capacitor port. * * The Cordova SDK uses this field to bootstrap native destination factories from companion plugins. * Those extension packages are not implemented in this first Capacitor release. */ factories?: any[];}RudderOptions
“루더 옵션”__CAPGO_KEEP_0__
export interface RudderOptions { /** * External identifiers forwarded with the event. */ externalIds?: Record<string, string>;
/** * Destination enablement flags keyed by integration name. */ integrations?: Record<string, boolean>;}RudderTraits
RudderTraits__CAPGO_KEEP_2__ identify and group.
export type RudderTraits = Record<string, any>;RudderProperties
RudderProperties__CAPGO_KEEP_3__ track and screen.
export type RudderProperties = Record<string, any>;PluginVersionResult
PluginVersionResult__CAPGO_KEEP_4__
export interface PluginVersionResult { /** * Version identifier returned by the platform implementation. */ version: string;}RudderLogLevelValue
RudderLogLevelValue이동 편의를 위해 RudderStack 로그 수준 값을 노출합니다.
export type RudderLogLevelValue = 0 | 1 | 2 | 3 | 4 | 5;이 페이지는 플러그인의 src/definitions.ts업스트림에서 pubic API이 변경될 때 다시 싱크를 실행하세요.