시작하기
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 프롬프트를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-crisp`
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/crisp/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.
설치
설치Capgo의 AI 보조 설치를 사용하여 플러그인을 설치할 수 있습니다. 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-crisp` plugin in my project.만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
bun add @capgo/capacitor-crispbunx cap syncImport
Importimport { CapacitorCrisp } from '@capgo/capacitor-crisp';API 개요
API 개요 제목configure
설정SDK을 사용하여 웹사이트 ID를 설정합니다. 이 메서드를 사용하기 전에 반드시 호출해야 합니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CrispPlugin.configure({ websiteID: 'YOUR_WEBSITE_ID' });openMessenger
__CAPGO_KEEP_0__ 메신저 열기Crisp 메신저 채팅 창을 열어줍니다. 사용자에게 채팅 인터페이스를 보여줍니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CapacitorCrisp.openMessenger();setTokenID
__CAPGO_KEEP_0__ 토큰 ID 설정현재 사용자 세션에 고유한 토큰 ID를 설정합니다. 이전 대화 복원 및 식별을 위해 사용됩니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CapacitorCrisp.setTokenID({} as { tokenID: string });setUser
Section titled “setUser”현재 세션에 사용자 정보를 설정합니다. 지원 담당자에게 보이는 사용자 프로필을 업데이트합니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CrispPlugin.setUser({ nickname: 'John Doe', email: 'john@example.com', phone: '+1234567890'});pushEvent
Section titled “pushEvent”Crisp에 사용자 행동과 행동을 추적하기 위해 사용자 행동을 커스텀 이벤트로 푸시합니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CrispPlugin.pushEvent({ name: 'completed_purchase', color: 'green'});setCompany
Section titled “setCompany”현재 세션에 회사 정보를 설정합니다. Crisp에서 사용자와 회사 간의 연결을 설정합니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CrispPlugin.setCompany({ name: 'Acme Corp', url: 'https://acme.com', employment: ['CEO', 'Executive'], geolocation: ['USA', 'San Francisco']});setInt
Section titled “setInt”사용자 세션에 커스텀 정수 데이터 필드를 설정합니다. 사용자 세션과 관련된 숫자 데이터를 저장합니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CrispPlugin.setInt({ key: 'user_level', value: 42 });setString
Section titled “setString”사용자 세션과 관련된 텍스트 데이터를 저장하는 사용자 정의 문자열 데이터 필드를 설정합니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CrispPlugin.setString({ key: 'subscription_tier', value: 'premium' });sendMessage
Section titled “sendMessage”사용자가 채팅에서 보낸 메시지를 프로그램적으로 보냅니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CrispPlugin.sendMessage({ value: 'Hello, I need help!' });setSegment
Section titled “setSegment”사용자를 Crisp 대시보드에서 분류하기 위해 사용자 세그먼트를 설정합니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CrispPlugin.setSegment({ segment: 'premium-users' });Crisp 세션을 초기화합니다. 사용자 데이터를 모두 삭제하고 새로운 세션을 시작합니다. 사용자가 로그아웃할 때 유용합니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CapacitorCrisp.reset();타입 참조
타입 참조 섹션ConfigureOptions
설정 옵션 섹션크립을 초기화하는 데 필요한 설정입니다.
export interface ConfigureOptions { /** * Your Crisp website ID from dashboard. */ websiteID: string; /** * Optional - Locale to force in the Crisp chat widget (ISO 639-1), eg. `en`, `fr`, `es`. * Web + Android: overrides the runtime locale. iOS follows the device/app locale. */ locale?: string; /** * Optional - Unique token identifier for the user session continuity. */ tokenID?: string;}eventColor
이벤트 색상 섹션크립 이벤트에 사용할 수 있는 색상입니다. 크립 대시보드에서 이벤트를 시각적으로 분류할 수 있습니다.
export type eventColor = | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'pink' | 'brown' | 'grey' | 'black';진실의 근원
섹션 제목: 진실의 근원이 페이지는 플러그인의 src/definitions.ts공개 API이 업스트림에서 변경될 때 다시 싱크를 실행하세요.
다음 단계로 진행하세요
“다음 단계로 진행하세요”라는 제목Capacitor를 사용하는 경우 Getting Started Capacitor를 사용하여 대시보드와 API 연산을 계획하고 관리하려면 API을 연결하세요 @capgo/capacitor-crisp를 사용하여 capgo의 네이티브 기능을 사용하세요 @capgo/capacitor-crisp를 사용하여 capgo의 네이티브 기능을 사용하는 경우 API 개요 API 개요를 사용하여 API의 구현 세부 정보를 확인하세요 소개 소개를 사용하여 __CAPGO_KEEP_0__의 구현 세부 정보를 확인하세요 API 키 구현 세부 정보에 대한 API 키에 대해 기기 구현 세부 정보에 대한 기기