コンテンツにスキップ

スタートガイド

  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のナビゲーションスタックで同じ命名規則を維持する
  • アプリが前景に戻ったときに、画面名と重要な動的変数を再送信する

__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のセットアップのページで完了してください。 iOSのセットアップ Androidには、プラグイン自体のための追加のマニフェストのワイヤリングが必要ありません。ログと検証のためのヒントについては、
  • Androidの注記 Androidの注記 for logging and validation tips.
  • 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.