시작하기
복사할 준비
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 네비게이션 스택에서 동일한 이름 규칙을 유지하십시오.
- 앱이 전면으로 돌아오면 스크린 이름 및 중요 동적 변수를 다시 보내십시오.
- 기본 사용법
개인 정보 보호를 위한 재생 제어
개인 정보 보호를 위한 재생 제어 섹션__CAPGO_KEEP_0__을 사용하여 세션 재생에서敏感한 콘텐츠를 제외하기 위해 내장된 마스킹 도우미를 사용하십시오.
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 내 앱 기능을 완료하기 위해 iOS에서 추가적인 deeplink wiring을 완료하십시오. iOS 설정 페이지.
- Android는 플러그인 자체에 대한 추가 매니페스트 wiring이 필요하지 않습니다. 플러그인에 대한 로깅 및 유효성 검사 팁을 보려면 Android 노트 Android 노트
Notes
노트- Capacitor Contentsquare Capacitor의 오픈 소스 커뮤니티 버전입니다.
- API는 Contentsquare Capacitor의 최신 문서와 동기화되며, 패키징 및 네이티브 빌드 설정은 Capacitor 8을 목표로 합니다.