컨텐츠로 건너뛰기

시작하기

GitHub

Capgo의 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-rudderstack` plugin in my project.

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

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

복사

__CAPGO_KEEP_0__ 개요

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

__CAPGO_KEEP_1__

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

__CAPGO_KEEP_3__

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

__CAPGO_KEEP_4__

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

__CAPGO_KEEP_5__

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

alias

별칭

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

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

reset

리셋

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

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

flush

flush

즉시 큐에 쌓인 이벤트를 플러시합니다.

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

RudderStack가 지원하는 목적지로 푸시 토큰을 전달합니다.

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

setAdvertisingId

광고 아이디 설정

현재 계약의 소스 정의를 참조하십시오.

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

putAdvertisingId

광고 아이디 설정

사용자 지정 광고 아이디 값을 설정합니다.

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

현재 계약의 소스 정의를 참조하십시오.

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

사용자 지정 익명 아이디 값을 설정합니다.

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

RudderStack 추적 옵트아웃을 토글합니다.

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

타입 참조

타입 참조

RudderConfiguration

RudderConfiguration

RudderStack native 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

RudderOptions

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

RudderTraits

RudderTraits

특성 데이터가 수락하는 identifygroup.

export type RudderTraits = Record<string, any>;

RudderProperties

RudderProperties

속성 데이터가 수락하는 trackscreen.

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란?

Getting Started를 사용하여 계획화된 대시보드와 __CAPGO_KEEP_0__ 연산을 위해 Using @API/__CAPGO_KEEP_1__-rudderstack Using @capgo/capacitor-rudderstack Using @capgo/capacitor-rudderstack API 개요 API 개요의 구현 세부 정보를 위해 소개 소개의 구현 세부 정보를 위해 API 키 API 키의 구현 세부 정보를 위해, 및 장치 장치의 구현 세부 정보를 위해