내용으로 건너뛰기

Getting Started

GitHub

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-contentsquare` plugin in my project.

만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요.

  1. 플러그인 설치

    터미널 창
    npm i @capgo/capacitor-contentsquare
  2. 자연 플랫폼 동기화

    터미널 창
    npx cap sync
  3. 업스트림 제품 구성 확인

기본 사용법

기본 사용법
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에서敏感한 콘텐츠를 유지하기 위해 내장된 마스킹 헬퍼를 사용하십시오.

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 설정 페이지.
  • Android는 플러그인 자체에 대한 추가 매니페스트 연결이 필요하지 않습니다. 로깅 및 유효성 검사 팁을 보려면 Android 노트를 참조하세요. 노트 이 플러그인은 __CAPGO_KEEP_0__ 8 커뮤니티에서 공식 Contentsquare __CAPGO_KEEP_1__ 패키지의 포트입니다.

자바스크립트 __CAPGO_KEEP_0__는 현재 Contentsquare __CAPGO_KEEP_1__ 문서와 동기화되며, 패키징 및 네이티브 빌드 설정은 __CAPGO_KEEP_2__ 8을 목표로합니다.

Getting Started에서 계속하세요.
  • This plugin is a Capacitor 8 community port of the official Contentsquare Capacitor package.
  • The JavaScript API stays aligned with the current Contentsquare Capacitor docs, while the packaging and native build setup target Capacitor 8.

The JavaScript __CAPGO_KEEP_0__ stays aligned with the current Contentsquare __CAPGO_KEEP_1__ docs, while the packaging and native build setup target __CAPGO_KEEP_2__ 8.

Getting Started에서 계속하기

__targetLanguage__에서 사용 중인 경우 Getting Started __targetLanguage__에서 native plugin 작업을 계획하고자 할 때, __targetLanguage__을 __CAPGO_KEEP_0__/__CAPGO_KEEP_1__-contentsquare와 연결합니다. __targetLanguage__에서 native capability를 사용하는 capgo/capacitor-contentsquare를 사용하는 경우, for the native capability in Using @capgo/capacitor-contentsquare, __targetLanguage__에서 product workflow를 사용하는 Capgo Plugin Directory를 사용하는 경우, Capgo Plugins by __CAPGO_KEEP_1__ __targetLanguage__에서 implementation detail를 사용하는 Capacitor Plugins by Capgo를 사용하는 경우, for the implementation detail in Capacitor Plugins by Capgo, __targetLanguage__에서 plugin을 추가하거나 업데이트 할 때, implementation detail를 사용하는 경우, __targetLanguage__에서 plugin을 추가하거나 업데이트 할 때, implementation detail를 사용하는 경우, Ionic Enterprise 플러그인 대체 __CAPGO_KEEP_0__