Sitelet https://capgo.app/ko/docs/plugins/rudderstack/getting-started/
내용으로 건너뛰기

시작하기

GitHub

설치

설치

AI-assisted 설정을 사용하여 플러그인을 설치할 수 있습니다. 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-rudderstack` plugin in my project.

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

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

initialize

initialize

RudderStack 클라이언트를 초기화합니다.

Cordova 서명이 유지되므로 두 번째 인자는 config 객체 또는 Rudder 옵션 객체 둘 중 하나여야 합니다.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.initialize('write-key-123');

identify

identify

제공된 사용자 ID에 대한 identify 호출을 보냅니다.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.identify('user-id-123');

group

group

제공된 그룹 ID에 대한 group 호출을 보냅니다.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.group('group-id-123');

track

track

제공된 이벤트 이름에 대한 track 호출을 보냅니다.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.track('event');

제공된 스크린 이름에 대한 스크린 호출을 보냅니다.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.screen('screen');

현재 사용자를 새로운 식별자로 별칭합니다.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.alias('new-id-123');

현재 루더 스택 식별자 상태를 리셋합니다.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.reset();

임의로 큐드 이벤트를 즉시 플러시합니다.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.flush();

RudderStack이 지원하는 모든 목적지로 장치 토큰을 전달합니다.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.putDeviceToken('device-token-123');

현재 계약의 소스 정의를 참조하세요.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.setAdvertisingId('advertising-id-123');

광고 ID의 사용자 지정 값을 설정합니다.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.putAdvertisingId('advertising-id-123');

현재 계약의 소스 정의를 참조하세요.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.setAnonymousId('anonymous-id-123');

사용자 고유 ID 값을 설정합니다.

import { nativePlugin } from '@capgo/capacitor-rudderstack';
await nativePlugin.putAnonymousId('anonymous-id-123');

루더 스택 추적 옵트 아웃을 켜거나 끕니다.

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[];
}

RudderStack 호출당 옵션입니다.

export interface RudderOptions {
/**
* External identifiers forwarded with the event.
*/
externalIds?: Record<string, string>;
/**
* Destination enablement flags keyed by integration name.
*/
integrations?: Record<string, boolean>;
}

Traits payload로 identify 그리고 group.

export type RudderTraits = Record<string, any>;

RudderProperties

RudderProperties 섹션

Properties payload로 track 그리고 screen.

export type RudderProperties = Record<string, any>;

PluginVersionResult

PluginVersionResult 섹션

플러그인 버전 데이터.

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공개 API이 업스트림에서 변경될 때 다시 싱크를 실행하세요.

Getting Started에서 계속

Getting Started에서 계속

이미 플러그인을 사용 중이라면 시작하기 계획 대시보드 및 API 작업을 계획하고 연결하세요. @capgo/capacitor-rudderstack을 사용하여 native 기능을 사용하는 @capgo/capacitor-rudderstack을 사용하여 API 개요 API 개요의 구현 세부 정보를 참조하세요. 소개 소개의 구현 세부 정보를 참조하세요. API 키 API 키의 구현 세부 정보를 참조하세요. 장치 __CAPGO_KEEP_0__의 구현 세부 정보를 참조하세요.