컨텐츠로 건너뛰기

시작하기

  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에서 유지하기 위해 내장된 마스킹 도우미를 사용하십시오.

Replay 개인 정보 보호 제어

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 앱 내 기능을 완료하기 위해 iOS 설정 iOS 설정 페이지.
  • Android는 플러그인 자체에 대한 추가 매니페스트 연결이 필요하지 않습니다. 자세한 내용은 Android에 대한 로그 및 유효성 검사 팁을 위한
  • 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.