시작하기
설치 단계와 이 플러그인에 대한 전체 마크다운 가이드가 포함된 설정 프롬프트 복사하기
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-contentsquare`
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/contentsquare/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.
-
플러그인을 설치하세요
터미널 창 npm i @capgo/capacitor-contentsquare터미널 창 pnpm add @capgo/capacitor-contentsquare터미널 창 yarn add @capgo/capacitor-contentsquare터미널 창 bun add @capgo/capacitor-contentsquare -
자연 플랫폼 동기화
터미널 창 npx cap sync터미널 창 pnpm cap sync터미널 창 yarn cap sync터미널 창 bunx cap sync -
업스트림 제품 구성 확인
공식 Contentsquare Capacitor 사용자 가이드 프로젝트 키, 재생 설정 및 대시보드 설정에 대한
기본 사용법
기본 사용 방법import { ContentsquarePlugin, CurrencyCode } from '@capgo/capacitor-contentsquare';
await ContentsquarePlugin.optIn();
await ContentsquarePlugin.sendScreenName('Home');
await ContentsquarePlugin.sendTransaction({ transactionValue: 29.99, transactionCurrency: CurrencyCode.EUR, transactionId: 'order-123',});
await ContentsquarePlugin.sendDynamicVar({ dynVarKey: 'store', dynVarValue: 'rome',});화면 이름 팁
화면 이름 설정 방법- 사용자 고유 값 대신 안정적인 이름을 사용하십시오.
- iOS 및 Android 네비게이션 스택에서 동일한 이름 규칙을 유지하십시오.
- 앱이 전면으로 돌아오면 화면 이름과 중요한 동적 변수를 다시 전송하십시오.
재생 프라이버시 제어
화면 이름과 중요한 동적 변수를 다시 전송하십시오.Session Replay에서 sensitive 콘텐츠를 유지하기 위해 내장된 마스킹 헬퍼를 사용하십시오.
await ContentsquarePlugin.excludeURLForReplay('/checkout/');
await ContentsquarePlugin.setCapturedElementsSelector('[data-cs-capture]');
await ContentsquarePlugin.setPIISelectors({ PIISelectors: ['input[type="email"]', '.credit-card'], Attributes: [{ selector: 'input[name="email"]', attrName: 'value' }],});플랫폼 설정
플랫폼 설정- iOS 앱 내 기능을 위해, 추가된 deeplink 연결을 완료하세요. iOS 설정 페이지.
- 안드로이드에는 플러그인 자체에 대한 추가 매니페스트 연결이 필요하지 않습니다. [Capacitor](https://capacitorjs.com/)를 참조하십시오. 안드로이드 노트 로그 및 유효성 검사 팁을 위한.
- This plugin is a Capacitor 8 community port of the official Contentsquare Capacitor package.
- 자바스크립트 API는 현재 Contentsquare Capacitor 문서와 동기화되며, 패키징 및 네이티브 빌드 설정은 Capacitor 8을 목표로합니다.