시작하기
복사할 수 있는 설정 프롬프트에 설치 단계와 이 플러그인의 전체 마크다운 가이드가 포함되어 있습니다.
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-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-crisp` plugin in my project.Manual Setup을 사용하는 경우, 플러그인을 설치하려면 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
bun add @capgo/capacitor-crispbunx cap syncImport
Import 제목import { CapacitorCrisp } from '@capgo/capacitor-crisp';API 개요
API 개요 섹션configure
설정SDK을 사용하여 웹사이트 ID를 설정합니다. 이 메서드를 사용하기 전에 반드시 호출해야 합니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CrispPlugin.configure({ websiteID: 'YOUR_WEBSITE_ID' });openMessenger
메신저 열기메신저 채팅 창을 열어줍니다. 사용자에게 채팅 인터페이스를 보여줍니다.
import { CapacitorCrisp } from '@capgo/capacitor-crisp';
await CapacitorCrisp.openMessenger();setTokenID
토큰 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';진실의 근원
이 페이지는 플러그인의다시 싱크를 실행할 때 upstream의 공개 __CAPGO_KEEP_0__이 변경되면. src/definitions.ts. Re-run the sync when the public API changes upstream.
다음 단계로 진행하세요
“다음 단계로 진행하세요”라는 제목Capacitor를 사용하는 경우 Getting Started Capacitor를 사용하여 대시보드와 API 연산을 계획하고 관리하려면 API을 연결하세요 Capacitor를 사용하여 @capgo/capacitor-crisp를 사용 Capacitor를 사용하여 @capgo/capacitor-crisp의 네이티브 기능을 사용 API 개요 API의 구현 세부 정보 소개 소개의 구현 세부 정보 API 키 API 키의 구현 세부 정보에 대해 장치 __CAPGO_KEEP_0__ 키의 구현 세부 정보에 대해 장치