Skip to content

시작하기

터미널 창
bun add @capgo/capacitor-rudderstack
bunx cap sync
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');

__CAPGO_KEEP_4__을 위한 사용자 ID로 제공된 identify 호출을 보냅니다.

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

__CAPGO_KEEP_4__을 위한 그룹 ID로 제공된 group 호출을 보냅니다.

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

__CAPGO_KEEP_4__을 위한 이벤트 이름으로 제공된 track 호출을 보냅니다.

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

스크린 이름을 제공하는 경우 스크린 콜을 보냅니다.

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

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

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

현재 RudderStack 식별자 상태를 리셋합니다.

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

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

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');

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

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

트래킹 차단을 설정/해제합니다.

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이 변경될 때 다시 싱크를 실행하세요.